what's are the css for an input field that has no css?

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>

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).


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.

链接地址: http://www.djcxy.com/p/89154.html

上一篇: 使用css将图像显示为圆圈图像

下一篇: 什么是没有CSS的输入字段的CSS?