webmonkey

 

border-style

Page history last edited by Dustin Genereux 2 yrs ago

Definition

 

The border-style property sets the style of the four borders, can have from one to four styles.

 

Inherited: No

 

JavaScript Syntax

 

CSS properties can also be dynamically changed with a JavaScript.

 

Scripting Syntax: object.style.borderStyle="dotted double"

 

CSS Property Description :

 

The border-style property sets the style of an element's border. This property must be specified for the border to be visible.

 

Between one and four keywords are specified. If four values are given, they apply to top, right, bottom, and left border style, respectively. If one value is given, it applies to all sides. If two or three values are given, the missing values are taken from the opposite side.

 

One may also use the border shorthand property.

 

Possible Values

 

Value Description

none - Defines no border

hidden - The same as "none", except in border conflict resolution for table elements

dotted - Defines a dotted border

dashed - Defines a dashed border

solid - Defines a solid border

double - Defines two borders. The width of the two borders are the same as the border-width value

groove - Defines a 3D grooved border. The effect depends on the border-color value

ridge - Defines a 3D ridged border. The effect depends on the border-color value

inset - Defines a 3D inset border. The effect depends on the border-color value

outset - Defines a 3D outset border. The effect depends on the border-color value

 

CSS Browser Support :

 

Internet Explorer 4+

Netscape 4+

Opera 3.6+

W3C's CSS Level 1+

CSS Profile 1.0

 

 

Example:

table {border-style: dotted}

all four borders will be dotted

table {border-style: dotted dashed}

top and bottom border will be dotted, left an right border will be dashed

 

table {border-style: dotted dashed solid}

top border will be dotted, left and right border will be dashed, bottom border will be solid

 

table {border-style: dotted dashed solid double}

top border will be dotted, right border will be dashed, bottom border will be solid, left border will be double

 

 

 

Sources

 

http://www.w3schools.com/css/pr_border-style.asp

http://www.highdots.com/css-editor/css_tutorial/box/border-style.html

http://www.tizag.com/cssT/border.php

Comments (0)

You don't have permission to comment on this page.