We Recommend

CSS: The Definitive Guide CSS: The Definitive Guide
Provides you with a comprehensive guide to CSS implementation, along with a thorough review of all aspects of CSS 2.1. Updated to cover Internet Explorer 7, Microsoft's vastly improved browser, this new edition includes content on positioning, text wrapping (nowrap), lists and generated content, table layout, user interface, paged media, and more.


Posted By

tylerhall on 08/11/06


Tagged

css textmate browser reset


Versions (?)


Who likes this?

14 people have marked this snippet as a favorite

postNuKe
marc0047
fatihturan
flodar
irdial
zensir
smilylion
dmarten
icarus
fael
hudge
bcalloway
JimiJay
nijitaro


Reset Browser Styles


Published in: CSS 


Put this these rules at the top of your CSS file and it will reset the default settings across all browsers to render the same. It's a great starting point for any new design. I took these rules from the Yahoo! YUI opensource kit.

  1. body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,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,th {text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;}q:before,q:after{content:'';}

Report this snippet 

You need to login to post a comment.