Using the Border Property





Using the Border Property

Unlike the margin and padding properties, the border property cannot set different values on the four sides. With border, you can only set all four sides to the same style, color, and width. To set different values on the four sides, you must use one or more of the other border properties.

The following style sheet puts a thick red border around elements of type DIV with CLASS "warning." Between the text and the border is half an em vertically and one em horizontally:


DIV.warning {

  border: solid red thick;

  padding: 0.5em 1em; }


     Python   SQL   Java   php   Perl 
     game development   web development   internet   *nix   graphics   hardware 
     telecommunications   C++ 
     Flash   Active Directory   Windows