June 17, 200818 yr Hi! I would like to know if reset the default browser values is a "must" and how do you do this ? I saw a lot of reset codes.. but some are too complete :-) Bests!!
June 17, 200818 yr You don't have to use them at all, it depends how you like to work and develop. Everyone who uses resets has their own techniques and methods, some will write 1kb's worth of reset styles, others will simply do * {padding: 0; margin: 0;}
June 17, 200818 yr To be honest - I never use global resets - and only tend to use resets on the bits which need changing when I come to coding them. However, it can save you a lot of time as you wont need to try to find why your page isn't loading correctly (when really it's down to a simple default margin/padding setting in the browser).
June 18, 200818 yr I definitely use Reset. But as BlueDreamer said, theres no need for a whole file dedicated to Reset.
June 18, 200818 yr I always start my .css files with this (I believe it's from a guy called eric mayer and is known as the meyer reset). /*=============TOTAL RESET=================*/ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, font, img, ins, kbd, q, s, samp, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { margin: 0; padding: 0; border: 0; outline: 0; font-weight: inherit; font-style: inherit; font-family: inherit; vertical-align: baseline; } /* remember to define focus styles! */ :focus { outline: white dotted 0px; } body { } ol, ul, li{ list-style: none; } /* tables still need 'cellspacing="0"' in the markup */ table { border-collapse: separate; border-spacing: 0; } caption, th, td { text-align: left; font-weight: normal; } blockquote:before, blockquote:after, q:before, q:after { content: ""; } blockquote, q { quotes: "" ""; } /*=============END TOTAL RESET=================*/ I find that this way my site is more consistent across browsers. There are many opinions on the pro's and cons of using a css reset. At the end of the day, it's a matter of preference for you. If memory serves me correctly there is a good article on mondaybynoon discussing this exact topic.
June 22, 200818 yr I can't say enough of Eric Meyer's reset, you should really use it. While you'll have to add margins and paddings for every element that you'll have to use eventually, it makes those settings consistent across all browsers so you'll have very few problems when it comes to layout and alignment issues between browsers like FF and IE. So in the long run it is definitely worth it. And using * also targets your forms and resetting paddings and margins there is not really necessary.
Create an account or sign in to comment