Download free stock photos on Dreamstime. Free registration

Old 17-04-2007, 15:04   #1 (permalink)
pgo
Senior Member
 
Join Date: Jan 2005
Posts: 12,336
reset.css

I recently read Eric Meyers' most recent blog posts:

Eric's Archived Thoughts: Reset Styles
Eric's Archived Thoughts: Reworked Reset
and
Eric's Archived Thoughts: Reset Reloaded

In the final one, he recommends a set of baseline styles for all browsers as follows:

Code:
/* Don't forget to set a foreground and background color on the 'html' or 'body' element! */ 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, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dd, dl, dt, li, ol, ul, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { margin: 0; padding: 0; border: 0; font-weight: inherit; font-style: inherit; font-size: 100%; line-height: 1; font-family: inherit; text-align: left; vertical-align: baseline; } a img, :link img, :visited img { border: 0; } table { border-collapse: collapse; border-spacing: 0; } ol, ul { list-style: none; } q:before, q:after, blockquote:before, blockquote:after { content: ""; }
This is to replace the Yahoo! UI reset.css as well as the ever-popular global whitespace reset: * { padding: 0; margin: 0; }

The advantage of his reset is that you avoid the trickier elements - frames, form inputs and so on - and you cover more ground than just padding and margins.

Discuss.

Last edited by pgo : 01-05-2007 at 15:42.
  Reply With Quote
Old 17-04-2007, 17:27   #2 (permalink)
freelancr
Web Developer
 
freelancr's Avatar
 
Join Date: Oct 2006
Posts: 3,767
always saw these things as being far too anal, never had any reason to do more than * { padding: 0; margin: 0; }
  Reply With Quote
Old 18-04-2007, 04:41   #3 (permalink)
finbarr
who the fuck am i?
 
finbarr's Avatar
 
Join Date: Apr 2005
Location: london
Posts: 2,713
Send a message via MSN to finbarr Send a message via Skype™ to finbarr
I kind of do this anyway but usually use the '*' for defining everything... perhaps this is a better (if somewhat longer) way of doing it?
__________________
who the fuck r u?
  Reply With Quote
Old 18-04-2007, 04:55   #4 (permalink)
cam
vague™
 
cam's Avatar
 
Join Date: Mar 2004
Location: Glasgow
Posts: 5,743
use the YUI one myself
__________________
  Reply With Quote
Old 18-04-2007, 06:27   #5 (permalink)
freelancr
Web Developer
 
freelancr's Avatar
 
Join Date: Oct 2006
Posts: 3,767
Quote:
Originally Posted by cam
use the YUI one myself

The thing that put me off about that one was the massive area of copyright comments that had to apparently remain if you were to use it.
  Reply With Quote
Old 18-04-2007, 06:36   #6 (permalink)
cam
vague™
 
cam's Avatar
 
Join Date: Mar 2004
Location: Glasgow
Posts: 5,743
who cares?
__________________
  Reply With Quote
Old 18-04-2007, 13:41   #7 (permalink)
freelancr
Web Developer
 
freelancr's Avatar
 
Join Date: Oct 2006
Posts: 3,767
Quote:
Originally Posted by cam
who cares?

  Reply With Quote
Old 18-04-2007, 14:32   #8 (permalink)
pgo
Senior Member
 
Join Date: Jan 2005
Posts: 12,336
Quote:
Originally Posted by cam
use the YUI one myself
How about Eric Meyers' complaint of their use of font-weight: normal; as default instead of inherit?

Anyone using any other part of the YUI library?
  Reply With Quote
Old 18-04-2007, 15:03   #9 (permalink)
cam
vague™
 
cam's Avatar
 
Join Date: Mar 2004
Location: Glasgow
Posts: 5,743
i used grids on one site just to test it out - no real complaints other than being required to use a markup style i normally wouldn't. wasn't really worth using to be honest.

fonts is too much of a pain in the arse, percentages are meaningless when you look at them 3 weeks later in a css file - need to go lookup YUI docs to see what size things actually are. 62.5% em method is far easier
__________________
  Reply With Quote
Old 18-04-2007, 15:08   #10 (permalink)
pgo
Senior Member
 
Join Date: Jan 2005
Posts: 12,336
That's the impression I got. The fonts CSS looked good, but I also use the 62.5% and ems method.

This whole thing has given me a wild hair. I'm going to create a global css file that will set base styles - fonts, sizes, colors, link decoration, etc - for all our corporate and subsidiary sites (most of which I don't control).
  Reply With Quote
Old 21-04-2007, 13:43   #11 (permalink)
2Dfruit
Billy Big Balls
 
2Dfruit's Avatar
 
Join Date: Jun 2006
Location: Ireland
Posts: 2,106
Useful link pgo. Cheers
__________________
ʎɐqǝ uo pɹɐoqʎǝʞ ɐ ʎnq ı ǝɯıʇ ʇsɐl ǝɥʇ sı sıɥʇ
  Reply With Quote
Old 01-05-2007, 15:39   #12 (permalink)
pgo
Senior Member
 
Join Date: Jan 2005
Posts: 12,336
He's "finalized" it...Eric's Archived Thoughts: Reset Reloaded

Code:
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, em, font, img, ins, kbd, q, s, samp, small, strike, strong, 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-size: 100%; font-family: inherit; vertical-align: baseline; background: transparent; } /* remember to define focus styles! */ :focus { outline: 0; } body { line-height: 1; color: black; background: white; } ol, ul { list-style: none; } /* tables still need 'cellspacing="0"' in the markup */ table { border-collapse: collapse; border-spacing: 0; } caption, th, td { text-align: left; font-weight: normal; } blockquote:before, blockquote:after, q:before, q:after { content: ""; } blockquote, q { quotes: "" ""; }
Interesting. I may start using this.
  Reply With Quote
Old 01-05-2007, 23:51   #13 (permalink)
dougmays
Registered User
 
Join Date: Oct 2006
Location: Ft. Lauderdale, FL.
Posts: 90
Send a message via AIM to dougmays
There was an article posted recently on digg and some other UI websites that read something along the lines of "26 designers interviewed and the 6 biggest questions answered", or something along t hose lines. it had a good set of "reset" styles. does anyone have a link to that site? i cant find it anywhere
  Reply With Quote
Old 02-05-2007, 06:36   #14 (permalink)
Stuzrol
Sir Digby Chicken Caesar
 
Stuzrol's Avatar
 
Join Date: Mar 2007
Posts: 41
Send a message via MSN to Stuzrol
  Reply With Quote
Old 02-05-2007, 21:51   #15 (permalink)
dougmays
Registered User
 
Join Date: Oct 2006
Location: Ft. Lauderdale, FL.
Posts: 90
Send a message via AIM to dougmays
thanks!
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive
Web Hosting by Heart Internet, vBulletin © 2000-2009 Jelsoft Enterprises Limited.
Search Engine Optimization by vBSEO 3.0.0 RC8
Web Hosting by Heart Internet