I have a simple input field.
<input name="1" onfocus="this.value=''" type="text" size="20" value="input 1" title="Enter your search here" />
Because different browsers add different amounts of padding, margin and border to it, I have to reset it as follows.
input
{
padding: 0;
margin: 0;
border: 0;
border: none;
}
Now I have a unstyled (leaving other properties such as font-size or cursor alone for the movement) and I want to bring back the appearnce that were default before the reset but with consistant values so that the appearance as well as the dimensions are same in all browsers. I do
input
{
border: 1px inset #F0F0F0;
}
However it changes something and the appearnce is not the same as per this fiddle where the first input (input 1) has not been reset with the border property while the second input (input 2) has been reseted (border: 0; border: none;) and again restyled (border: 1px inset #F0F0F0;).
How do I get the same appearance back after applying a style reset to it.
You can’t get the default styles back once you change them. If you want to normalize the margins and padding across browsers, just normalize the margins and padding and don’t touch any of the other styles, especially border and background.