Latest tutorial: Making a Movieclip face another Movieclip or point on the stage | Ask Tutorial5!
 

Get tutorials on EMail




Build Your Own Database Driven Website Using PHP & MySQL

SitePoints Best Seller book on scripting.

  • Learn how to install and administer PHP & MySQL on Windows, Linux or Mac

  • Build your very first live Database Driven Website using PHP & MySQL

  • Instantly apply working code examples from the book to your Website


Download the free chapters now!

CSS Borders

(10 votes)
Written by Daniel H   

A border can be a visual separator between the margin on the outside, and the padding on the inside. You can set the width, color, and style of the entire border, or you can set each of these properties individually for each side.

The border-width property allows you to set all four widths at the same time. The value can be thin, medium, thick, or a numeric value and unit, such as 5px or 0.2em.

If you want to a medium border around every paragraph, you could use:
p { border-width: medium; }
/* This sets all to medium */

p { border-width: medium medium; }
/* This sets top/bottom medium then right/left medium */

p { border-width: medium medium medium medium; }

But guess what? The default border is no border at all, so you'll need to add a second property, border-style, if you want any border to visually appear. The values for border-style are:
none, dotted, dashed, solid, double, groove, ridge, inset, outset.

The first five appear just as they would seem to appear by their description. The last four are special 3D looking borders.



Subscribe now via RSS feed and get all the new tutorials


Do you need more help? Ask now!
 

busy
Last Updated ( Thursday, 31 January 2008 )