admin管理员组文章数量:1426620
I am trying to style posts on my website, but when I try to change font size with media function in CSS I can't seem to change font size for h2. When I go to "inspect element" and navigate to "style" section I see that my styling for fon-size is crossed. What does that mean?
I am trying to style posts on my website, but when I try to change font size with media function in CSS I can't seem to change font size for h2. When I go to "inspect element" and navigate to "style" section I see that my styling for fon-size is crossed. What does that mean?
Share Improve this question edited May 19, 2019 at 15:11 fuxia♦ 107k39 gold badges255 silver badges459 bronze badges asked May 19, 2019 at 14:58 ToTheSpace 2ToTheSpace 2 1011 bronze badge 1- 1 The order of media queries is important, take a closer look into this. This question will be deemed off topic, as it is not WordPress specific. Please take a close look at the help center to learn about the sites guidelines. – Nicolai Grossherr Commented May 19, 2019 at 15:30
1 Answer
Reset to default -1It's being overwritten by the line at the top. You can see from the bit on the end of the filename that the your media query CSS is on line 133, but the CSS that's overwriting it is on line 182. Because they use the same selector (.posts h2
) the last one will take precedence, according to the rules of specificity. You either need to remove the line on 182, or move your new CSS below it.
本文标签: cssWhy doesn39t media(maxwidth) work on h2 title
版权声明:本文标题:css - Why doesn't media(max-width) work on h2 title? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745481141a2660177.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论