O'Reilly logo

Real World XML by Steven Holzner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating Borders

You can also create borders for elements using CSS, setting the border style, border width, border color, and so on. Here are the border properties that are available:

  • border-bottom-width— Sets the width of the bottom of the border. Set this to an absolute measurement, such as 10px for 10 pixels, or 4pt for 4 points; or use a keyword, as in thin, medium, or thick.

  • border-color— Specifies the color you want the border to be displayed in (use a predefined color or a color triplet). Setting this property to one value sets the color of the whole border; two values set the top and bottom borders to the first value and the right and left borders to the second; four values set the color of all border parts in order: top, right, bottom, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required