Reputation: 6448
If I have 2 input fields with no CSS, and then I add ONLY a background color to one, it changes the look of that field completely. It seems to change at minimum, the height, the border, the border-style and the border color.
I know I can change the CSS for all the input fields to make them match. But does anyone know what the CSS is for the default settings of an input text field? I like the way it looks and I have to match many that have no CSS.
example:
<style type="text/css"> #b { background-color: #FFF; } </style> </head> <body> <form> <input id="a" type="text" /> <input id="b" type="text" /> </form> </body>
Upvotes: 0
Views: 151
Reputation: 1837
Welcome to the css resets world.
I found that it is simply a must for a web site to hav some reset rules, in order to stop all those quirks and different default values of certain elements.
The one im using is this one.
Upvotes: 1
Reputation: 522110
This is entirely browser and OS dependent, every browser has a different default style for input elements and will react differently when applying extra styles. For consistent cross-browser input elements you need to style every aspect of the element (at the very least borders, background and padding).
Upvotes: 4