XML technologies / CSS / Advanced websites with CSS / CSS property reference / border
(Excerpt from “CSS − Advanced websites with Cascading Stylesheets” by Rachel Andrew & Dan Shafer)
The shorthand property border sets a border with the same width, colour and style on all four sides of the HTML element.
Inherited: no
See also: border-width, border-style and border-color
Values
border-width, border-style and border-color each receive a valid value. Values are separated by spaces.
Default value: none
Compatibility
CSS version: 1
Works in all CSS-capable browsers, subject to the respective limitations of border-width, border-style and border-color.
Example
The following style rule creates a one-pixel-wide yellow dashed border around all div elements on the page:
div {
border: dashed yellow 1px;
}
Copyright © 2006 of the German translation, dpunkt.verlag GmbH
You may print the online version for your private use.
Otherwise, this chapter from “CSS − Anspruchsvolle Websites mit Cascading Stylesheets” is subject to the same conditions as the bound edition: the work, including all its parts, is protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
dpunkt.verlag GmbH, Ringstraße 19, 69115 Heidelberg