Tuesday, November 11, 2008

Resetting all styles with CSS

This is something I saw on one of Yahoo’s SDK pages so I take no credit for it. I simply want to put it here one more time because it is one of the things I’m using over and over again and I find it very helpful.

Just take the code and drop it in your CSS file. It will reset everything so that you can start styling from scratch.

/* Reset All Tags */    
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td { 
    margin:0;
    padding:0;
}    
table {
    border-collapse:collapse;
    border-spacing:0;
}
fieldset,img { 
    border:0;
}    
address,caption,cite,code,dfn,em,strong,th,var {
    font-style:normal;
    font-weight:normal;
}
ol,ul {
    list-style:none;
}
caption {
    text-align:left;
}
h1,h2,h3,h4,h5,h6 {
    font-size:100%;
    font-weight:normal;
}
q:before,q:after {
    content:'';
}
abbr,acronym { border:0;
}
 
ND Reset All Tags */    

No comments: