• Hi Guys,

    I’ll be very thankfull if you guys could help me solve this one. Im trying to work on the css of a WordPress template/theme. To do this I hit f12 on chrome to inspect the element in order to see where the css rule is located to change it.

    But when i do, it tells me the css rule is in the Index page. I search and search without succes.

    Can you please help me?

    Here a link to the screenshot. You can see a red button and the description of the right side.

    https://josephgirigorie.valegoconsulting.com/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello,

    The codes are showing seems from your style.CSS file, Please check the code in that file and let me know if you found that there.

    Usually, when you see the source is index, it means that the stylesheet is “inline,” meaning the CSS is written directly to an inline stylesheet in the HTML and not in an external file. If you click on the index link, it should switch to the Sources pane and show the inline stylesheet in the HTML. Or, if you do a view source on the page, you should be able to scroll down and find the CSS in question.

    Thread Starter JLegacy

    (@jlegacy)

    Thank you for your help guys, i appreciate! Where can i find that file on my wordpress? I went to see the source but where can i find that particular source on Filezilla or WordPress?

    That is very difficult to figure out, it would depend upon the theme that you are using. If you are really interested in finding out, you’ll have to search through your theme files. However, if you are trying to change the CSS, you don’t want to change theme files anyway. If the theme gets updated because of feature enhancements, bug fixes, or security patches, or if the theme has to be updated because of a change to the WordPress core, then your changes will be lost. Instead, either create a child theme or use a CSS plugin like Jetpack or Custom CSS Manager, and then write your own CSS rule to override the existing rule. That’s the way you would normally change the CSS. If you use Jetpack, then the custom CSS file that Jetpack creates usually comes after any inline stylesheet, so it’s easier to write an overriding CSS rule.

    Hello,

    You can also find that using your WordPress dashboard.

    Please go to appearance > editor > index.php . Let me know if that helps.

    Thank you.

    @sam – modifying theme files really isn’t a good way to go – as those changes will be lost when the theme is updated.

    @WPyogi- Sorry for the confusion. I have not maintained anywhere to edit the style.CSS as all changes made there will lost on update making the site down.

    Just for finding the code I have maintained style.CSS.

    Sorry for the confusion again.

    Thank you.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Change CSS style to theme using inspect element’ is closed to new replies.