CSS Reset, default styles for common elements

后端 未结 11 2554
情歌与酒
情歌与酒 2020-12-04 17:44

After applying a CSS reset, I want to get back to \'normal\' behavior for html elements like: p, h1..h6, strong, ul and li.

Now when I say normal I mean e.g. the p e

11条回答
  •  一整个雨季
    2020-12-04 18:12

    Check out YUI (Yahoo's open source user interface conventions).

    They have a base stylesheet that undoes their own reset css. They dont actaully recommend you use it in production - since its counter productive but definitely might be worth checking out the file to get relevant snippets for what you want to 'undo'.

    I recommend you watch the 40 minute talk to get up to speed.

    Heres a short snippet of their base.css file :

    ol li {
        /*giving OL's LIs generated numbers*/
        list-style: decimal outside;    
    }
    ul li {
        /*giving UL's LIs generated disc markers*/
        list-style: disc outside;
    }
    dl dd {
        /*giving UL's LIs generated numbers*/
        margin-left:1em;
    }
    th,td {
        /*borders and padding to make the table readable*/
        border:1px solid #000;
        padding:.5em;
    }
    th {
        /*distinguishing table headers from data cells*/
        font-weight:bold;
        text-align:center;
    }
    

    Download the full stylesheets below or read full documentation.

    Yahoo reset css | Yahoo base (undo) reset css

提交回复
热议问题