Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

CSS: Spacing and Areas : Page 7

Learn to use proper spacing and make good use of your Web pages.


advertisement
Border Width
{border-width: XXunits/thin/medium/thick}
The border-width property lets you set the border width of all four of an element's borders simultaneously.

It is illegal to use negative values for border-width. Different web browsers interpret thin, medium, and thick differently, but the width of thin is always smaller than medium, which is always smaller than thick.

You can enter one to four values to set different widths for different borders of an element. If there is one value, all four sides are the same width. If there are two values, the first value sets the top and bottom borders, and the second value sets the left and right borders. If there are three values, the first value sets the top border, the second sets the left and right borders, and the third sets the bottom border. If there are four values, the first sets the top border, the second the right border, the third the bottom border, and the fourth the left border.



The border-width property should be used in conjunction with the border-style property to ensure that CSS-enabled browsers process it correctly.

Example:

P {border-width: medium thin thick}

If you are using a CSS-enabled browser, this paragraph has a medium top border, thin right and left borders, and a thick bottom border.



P {border-width: 20px}

If you are using a CSS-enabled browser, this paragraph has a 20-pixels-wide border.





Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap