Collected by Elizabeth Janson Home Page |
|
Every block-level element or replaced element is contained in what the cascading stylesheets creators call a box.![]()
You can control the padding, border, and margin separately. <P style="padding: 10px; background-color:#ffddff; border-color: red gold green blue; border: solid 15px ; margin: 5px;"> This example is placed in a table with coloured background, so the transparent margin is revealed. Transparent padding surrounds the text.
Border PropertiesThere are properties for all four sides of the element box. And one set each for the three kinds of defining qualities (width, style, color). By mixing and matching the various predefined styles, selecting the right colors and setting various widths a great variety of looks can be achieved. Border-Width:border-top-width: [value] border-left-width: [value] border-right-width: [value] border-bottom-width: [value] Widths can be specified with 'thin', 'medium', 'thick' or any of the CSS "length" units. The initial value is 'medium' (used if no width is specified). Widths set using padding: 10px; Border-Color:border-top-color: [value] border-left-color: [value] border-right-color: [value] border-bottom-color: [value] Colors may be specified with any of the CSS color values, or as 'transparent'.
Example: <P style="color: black; background: white; border: solid;"> In this example, the border will be a solid black line (because color is inherited). Border-Style:The initial value of the border style is 'none', so no borders will be visible unless the border style is set.border-top-style: [value] border-left-style: [value] border-right-style: [value] border-bottom-style: [value] The predefined styles that work for IE4 are: none, solid, double, groove, ridge, inset, outset <h2 style="border: solid 15px ;border-color: red gold green blue">City Gallery Books</h2>
BLOCKQUOTE { border:solid; border-color: red; padding: 10px; border-left: thick double; color: green } border:solid; had to be added as first item, to make this example work.
|
CSS begins here |
|
This page is part of Elizabeth Janson's web site
http://www.geocities.com/elizatk/index.html
Tetbury residents in the Eighteenth Century my Australian Family History and Barrie, our Family Poet. |