Quick Tip 4 – CSS Resets

When I work on a design when developing in Dreamweaver, almost the first thing I do every time is apply a Reset to my Style Sheet. So what is a CSS Reset?

To get things kicked off let me explain the CSS Reset and why I use it. By default Tags such as h1, li, ul, form, a and many others already have predefined styles on margin and padding which personally I have found can be quite difficult to keep consistent across browsers. To combat this you can take off all predefined styles with a simple slice of code.
Quick Tip Gary
While there are many to choose from you may wish to modify them to suit your needs. The CSS Reset I consistently use is below:


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; }
img { border: none; }

However it is always evolving. If you would like to see others have a search in Google as there are plenty around.

Related posts:

  1. Quick Tip 15 – WP More Tag
  2. Quick Tip 5 – Compact CSS
  3. Quick Tip 9 – CSS min height
  4. Quick Tip 14 – WP E-commerce
  5. Quick Tip 19 – WP Permalinks

Tags:

2 Responses to “Quick Tip 4 – CSS Resets”


  1. G.- Says:
    March 4th, 2010 at 2:27 pm

    If your CMS gives users the ability to create tables and adjust cellpadding, i recommend not setting the padding for the TD to 0.

    Also setting outline:0; for the A tag kills usability, navigating by tab becomes really difficult same for some mobile devices that don’t have a pointer. If the client does not like how the outline looks, just give it a nice style.

    If long outlines in FF is giving you problems check this article by Jonathan Snook http://snook.ca/archives/html_and_css/trimming_long_o.

    Still nice start for a reset.css, most i have seen include a “list-style:none;” for ul.

    Cheers,,

    G.-


  2. Martyn Says:
    March 4th, 2010 at 4:32 pm

    Thanks for pointing that out, I’ll remove that from my styles in the future. I will be sure to give the snook site a visit.

Leave a Reply

Gary Morgan

Gary Morgan
Sales Director

Martyn Palmer

Martyn Palmer
Lead Designer

Oliver Blake

Oliver Blake
Web Designer

Tom Bradshaw

Adam Church
Web/Print Designer

Website Design

Website Design

For the complete standard compliant website.

Online Shops

Online Shops

Sell Products Online and manage your own stock.

Seo Marketing

SEO Marketing

Rank with search engine optimisation.

Print Design

Print Design

Logo design, stationary design & folder design.