Slide 5.17: CSS border
Slide 5.19: CSS border (cont.)
Home

CSS Border (Cont.)


Border—Individual Sides
In CSS it is possible to specify different borders for different sides:
   p {
    border-top-style:dotted;
    border-right-style:solid;
    border-bottom-style:dotted;
    border-left-style:solid;
   }
The example above can also be set with a single property:
   border-style:dotted solid;
The border-style property can have from one to four values. The border-style property is used in the example above. However, it also works with border-width and border-color.


Demonstration
The following demonstration shows how the script of HTML and CSS is displayed on the Web: