The border CSS attribute is what I think you're looking for. See MSDN: http://msdn.microsoft.com/en-us/library/ms533532%28VS.85%29.aspx
JMP
2009-08-19 22:19:56
The border CSS attribute is what I think you're looking for. See MSDN: http://msdn.microsoft.com/en-us/library/ms533532%28VS.85%29.aspx
Theoretically you can write a style rule like:
input[type=text] {
border: 4px solid purple;
}
However, the [type=text]
syntax is not cross-browser compatible. I generally add a text
class to the input, like so;
<input type="text" class="text" name="foo" />
Then you can write a traditional CSS rule like:
input.text {
border: 4px solid purple;
}
Of course, this assumes you want four pixel solid purple borders. Adjust accordingly.
The input fields in your screenshot have not actually been styled, they look like the OS defaults. Instead, the designer has opted to style the parent elements such as the form
, fieldset
and possible div
s or lists
for positioning.
This article will give you a great foundation for building prettier forms.