DiscussAdmin Forum Seperator
Advert Left
User CP New PostsFavorites FAQReferrers Web Tools

HTML & CSS Need help with HTML or CSS? Post your questions here.



Reply
 
LinkBack Thread Tools Display Modes
Fresh Meat
 
Join Date: Dec 2009
Posts: 1
iTrader: (0)

Jonybhai is on a distinguished road

Old 12-30-2009   #1 (permalink)
CSS Reset


Where do people stand on CSS resets?

I used to use
CODE
* {margin: 0; padding: 0;}
to cancel all the browsers' default margin and padding.

But I've been reading recently that a lot of people don't use this anymore as it creates more work later on by cancelling margin and padding on certain elements which need margin and padding, such as form elements.

Is it best to reset default styles only for certain elements, or just let the browsers do their thing?
__________________

To view links or images in signatures your post count must be 15 or greater. You currently have 0 posts.
-
To view links or images in signatures your post count must be 15 or greater. You currently have 0 posts.
Jonybhai is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Junior Member
 
deathshadow's Avatar
 
Join Date: Aug 2008
Posts: 130
iTrader: (0)

deathshadow is on a distinguished road

Old 02-23-2010   #2 (permalink)
The issue with form elements is a huge one, making the 'global reset' you mentioned really problematic. No two browsers apply padding/margins/height/width to form elements the same way since the HTML specification doesn't even say how to handle them - so even THINKING about screwing with anything on a form element more than color and width is just begging for it to break cross-browser.

The global reset is 'cute' for quick and dirty development testing, but I'd never deploy it on a production website.

There are some REALLY HUGE fat bloated resets out there, like Eric Meyer's Reset Reloaded - which frankly wastes a lot of time setting values on elements that have nothing to do with a 'reset' and that I personally would be setting to different values anyways.

The reset I use trims away the fat and resets just the elements I need reset.

Code:
/* null margins and padding to give good cross-browser baseline */
html,body,address,blockquote,div,
form,fieldset,caption,
h1,h2,h3,h4,h5,h6,
hr,ul,li,ol,ul,
table,tr,td,th,p,img {
	margin:0;
	padding:0;
}

img,fieldset {
	border:none;
}
I've never needed more, and less doesn't get the job done for me.
__________________

To view links or images in signatures your post count must be 15 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 15 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 15 or greater. You currently have 0 posts.
deathshadow is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0
Copyright ©2007 - 2010. DiscussAdmin.com. All rights reserved.
All times are GMT +1. The time now is 08:47 PM.
Quick Registration
User Name:
Password:
Confirm Password:
Email:
Confirm Email:
Birthday:  
Check to Agree with forum rules 

Login!
Not Registered yet? Click here to do so now!

Advertisements