[thelist] "Non-3d" form boxes

Aylard JA (James) jaylard at equilon.com
Thu Dec 7 10:23:01 CST 2000


Gerd,

> I'm trying to apply some style to my form elements for the first time,
> namely to the *select* element. To my surprise, Jeff's shorthand version
> for border broke the forms elements completely in NN4.76/Mac, while Bob's
> border declarations worked - that is the select elements didn't show any 
> style, but looked ok otherwise. If I change the shorthand to

	Bob's style sheet was inefficiently constructed; Jeff's example
presented the same thing more compactly. Why does the first one work in
Netscape 4.x, and the second doesn't -- who knows? This is Netscape 4.x,
after all.

> border-style : 1px #333333 solid;

	This is an incorrect construction (for two reasons), and that it
works anywhere must be due to the grace (or bugginess) of the browsers in
question (although it does not work for me in either IE 5.01 SP1 or Netscape
6 on Win32). The two reasons?

1) you may not designate either a width value or a color value for the
border-style property
2) if you were using the border shorthand property (as opposed to
border-style), the correct order of values should be:

border: width style color ;

	For the record, here are the links to the W3C CSS 1 & 2 specs that
should help to clarify some of these questions:

CSS 1
http://www.w3.org/TR/REC-CSS1

CSS 2
http://www.w3.org/TR/REC-CSS2/

James Aylard




More information about the thelist mailing list