12-10-2007, 07:39 AM
|
#13 (permalink)
|
|
The Contributor
Join Date: Dec 2007
Location: Belgium
Posts: 60
Thanks: 6
|
Quote:
Originally Posted by Wildhoney
Maybe not 95% but it makes as a good title! It'll solve a lot of problems out there as the majority of the issues I see with cross-compatibility issues - the coder has not reset the paddings and margins.
Code:
padding: 0;
margin: 0;
|
The 5% where it does not solve the problems relate to form elements like textarea and inputs.
Quote:
This is why so many people zero out their padding and margins on everything by way of the universal selector. That’s a good start, but it does unfortunately mean that all elements will have their padding and margin zeroed, including form elements like textareas and text inputs. In some browsers, these styles will be ignored. In others, there will be no apparent effect. Still others might have the look of their inputs altered.
From: http://meyerweb.com/eric/thoughts/20...set-reasoning/
|
Eric Meyer's follow-up article, "Reset Reloaded", is definitely worth a read as well.
Quote:
Originally Posted by Wildhoney
I've come across this problem before. Isn't it when an element is floated and you set a margin, IE will double the margin?
|
True. Can be fixed easily though by applying display:inline; to the floated box.
Read more about it here: http://www.positioniseverything.net/...ed-margin.html.
|
|
|
|