开发者

After applying Reset CSS <em>, <code> and other tags lost their default style

开发者 https://www.devze.com 2022-12-21 01:48 出处:网络
I found that I开发者_如何学Go should be using Reset CSS file for making websites, but after I include it, all the <em> and <code> tags lose their style. <em> is not longer italic and

I found that I开发者_如何学Go should be using Reset CSS file for making websites, but after I include it, all the <em> and <code> tags lose their style. <em> is not longer italic and <code> is no longer constant font.

I fixed it by adding em { font-style: italic; }, but I can't possibly add this for all the tags that lost their style?

Any ideas why?

Thanks, Boda Cydo.


The simple way will be to remove the styles from reset that you don't want re-styled or want to preserve. Reset css does not mean that you can not customize or delete anything from it.


I found CSS resets to be a pain. In the end, you basically put back the styles that were already there by default. It's much easier to just style the elements as needed.

No CSS Reset

The problem I've had with these resets is that I then find myself declaring much more than I ever needed to just to get browsers back to rendering things the way I want. As it turns out, I'm perfectly happy with how a number of elements render by default. I like lists to have bullets and strong elements to have bolded text.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号