Sunday, 18 August 2013

CSS: Chrome adding unnecessary margin in HTML form input

CSS: Chrome adding unnecessary margin in HTML form input

Google Chrome adds an extra top-margin in HTML form input field..
I think an example is better than description, so I'll add a JSFiddle link:
http://jsfiddle.net/jakeaustin5574/7VeGH/
You can see that the Text Input field has an extra top-margin, while the
submit button doesn't
(I added yellow div background to simply to illustrate this).
However, this does not happen in FireFox. (I haven't checked other browsers)
As you can see, I added the following CSS style, yet the margin still
appears.
* {
margin: 0px;
padding: 0px;
}
I guess this has something to do with Chrome's default styling.
How do I remove this margin?
Thanks

No comments:

Post a Comment