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, ...

Get Real World XML now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.