Javascript Reference
Categories: STYLE

javascript STYLE borderStyle

@Aug. 15, 2009, 12:43 p.m.
borderStyle Firefox/Netscape/NN 6 IE 4 Chrome/Safari/DOM 2  



This is a shortcut property that lets you set multiple border edges to the same or different style. You may supply one to four space-delimited style values. The number of values determines which sides receive the assigned colors.

document.getElementById("announce").style.borderStyle = "solid";
document.getElementById("announce").style.borderStyle = "solid double";
document.getElementById("announce").style.borderStyle =
"double groove groove double";

Style values are case-insensitive constants that are associated with specific ways of rendering border lines. The CSS style constants are: dashed, dotted, double, groove, hidden, inset, none, outset, ridge, and solid. Not all browsers recognize all the values in the CSS recommendation. See the border-style attribute listing for complete details on the available border styles.

This property accepts one, two, three, or four style values as a string, depending on how many and which borders you want to set with specific styles.  



Powered by Linode.