我在网站的标题中添加了一个徽标www.theestablishmenthairdressing.com
但它非常小(左上角的徽标(。
我可以通过检查Safari
中的代码看到,看起来主题中内置的徽标大小有限制:
<h1 class="header-logo">
<a href="http://www.theestablishmenthairdressing.com/" rel="home">
<img class="" width="50" height="50" src="//www.theestablishmenthairdressing.com/wp-content/uploads/2017/08/Establishment-LOGO-header.png" alt="The Establishment Hairdressing" />
</a>
</h1>
但是,我不清楚如何改变这一点。我试过添加.CSS
h1.header-logo {
width: 200px !important;
}
然而.css对于儿童主题的风格来说,这并没有区别。
请帮助我摆脱困境。
将文件复制到可能header.php
此代码的子主题文件夹,并从img
标记中删除width="50" height="50"
。现在,您可以在style.css
中进行更改。
你应该像下面这样使用。
h1.header-logo img {
width: 200px !important;
}
或
h1.header-logo>a>img {
width: 200px !important;
}
只需删除图像标签的宽度和高度属性:
<img class="" src="//www.theestablishmenthairdressing.com/wp-content/uploads/2017/08/Establishment-LOGO-header.png" alt="The Establishment Hairdressing">
它应该可以正常工作。
http://wpdemos.themezaa.com/pofo/documentation/knowledgebase/logo-typography-and-colors/change-logo-size/
标题徽标的代码
header a.logo-light img{ max-height: 26px;}
粘性标题徽标的代码
header a.logo-dark img {max-height: 26px;}
页脚徽标代码
.footer-logo { max-height: 26px; }
汉堡标志代码
.hamburger-logo img { max-height: 46px; }