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
https://forums.phpfreaks.com/topic/95953-css-reset/
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
https://forums.phpfreaks.com/topic/95953-css-reset/#findComment-491253
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
https://forums.phpfreaks.com/topic/95953-css-reset/#findComment-491400
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.