最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

php - Where can I find the inline-css of my theme header?

programmeradmin1浏览0评论

I struggle to find some specific inline-css of my theme header. I tried to edit the style.css of my child theme, what doesn't work. (in the developer tool from chrome it works!). I installed some plugins for specific css. I tried to edit it at the "Customizer" page, I used the integrated theme css editor. Nothing works.

It's actually a general question I have here: Where can I find the inline-css from the html elements on the screenshot below? Is the html created only with php? When yes, which files are including the html elements I see on the screenshot?

Thanks in advance!

Edit: I mean the inline-css on the right side... the "width 53px; height: 30px;" etc. Because of they're included into my logo, what's in my header. This inline-css appears therefore on every page, what's not what I want.

I struggle to find some specific inline-css of my theme header. I tried to edit the style.css of my child theme, what doesn't work. (in the developer tool from chrome it works!). I installed some plugins for specific css. I tried to edit it at the "Customizer" page, I used the integrated theme css editor. Nothing works.

It's actually a general question I have here: Where can I find the inline-css from the html elements on the screenshot below? Is the html created only with php? When yes, which files are including the html elements I see on the screenshot?

Thanks in advance!

Edit: I mean the inline-css on the right side... the "width 53px; height: 30px;" etc. Because of they're included into my logo, what's in my header. This inline-css appears therefore on every page, what's not what I want.

Share Improve this question asked Aug 27, 2019 at 10:49 Damir LucicDamir Lucic 131 silver badge3 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 2

That part of the page layout is most often inside of the header.php file in your theme root folder.

But before you edit that file directly, a few advices:

  • Do you use a child theme? If not, or you are not sure, than it is not advised to edit that file directly, because when the next update comes out for your theme, your changes will be overwritten by it.
  • If you are not familiar with theme development and/or child theme setup, and are looking just for a quick fix, you can add your css through the Customizer, but with the !important clause on the end of each rule. For instance, like this:
.logo-main {
    width: auto!important;
    height: auto!important;
}

This will basically override the inline css for that element with the default values.

  • Often the inline css is added by JavaScript (jQuery) using some specific math. If that is the case, don't be surprised if you don't find the inline css in your template files.
  • As long as the inline styles are not using !important clause, you'll be fine with your important rules.
发布评论

评论列表(0)

  1. 暂无评论