Jump to content

css reset


brown2005

Recommended Posts

[code]i am seeing a lot of articles on css reset when im looking through sites and wondered if anybody new the best one to use..

also i am seeing this 

[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,
dd, dl, dt, li, ol, ul,
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%;
		line-height: 1;			
		font-family: inherit;
		text-align: left;			
		vertical-align: baseline;

	}

 

can you not just have

 

		*
	{

		margin: 0;
		padding: 0;
		border: 0;
		outline: 0;
		font-weight: inherit;
		font-style: inherit;
		font-size: 100%;
		line-height: 1;			
		font-family: inherit;
		text-align: left;			
		vertical-align: baseline;

	}

[/code][/code]

Link to comment
Share on other sites

Doing that screws with form elements and makes them unpredictable across browsers. The whole point of reset sheets is to try to make all browsers start from a level playing ground. So while you can do that, it kind of defeats the purpose to some degree.

Link to comment
Share on other sites

ok cool. ill leave it as it is then...

 

but is the code below the best... or is there anything else i need to add to it.... ?

 

		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;

	}

	/* remember to define focus styles! */
	:focus 
	{

		outline: 0;

	}

	body
	{

		line-height: 1%;
		color: black;
		background: white;

	}

	ol, ul
	{

		list-style: none;

	}

	table
	{

		border-collapse: collapse;
		border-spacing: 0;
		margin: 0 auto;			

	}

	caption, th, td 
	{

		text-align: left;
		font-weight: normal;

	}

	blockquote:before, blockquote:after, q:before, q:after
	{

		content: "";

	}

	blockquote, q 
	{

		quotes: "" "";

	}

Link to comment
Share on other sites

As far as form elements are concerned, it is only the "style-able" form elements you need worry about - frameset, legands, lables, selects, etc.

 

I set them to a base starting point that I am comfortable with - based on how I personally always use them, for example:

 

fieldset {border: 1px solid #000; }
legend {margin:0 0 0 5px; padding:0 0 0 5px; color: #000;}
input, textarea, select {margin: 0; padding: 1px; font-size:1em; font-family: inherit;}
select {font-family:inherit; font-size:1em; padding: 0}

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.