40
CHAPTER 3. CSS
...
3.6
The border Property
CSS allows you to put borders around the box enclosing any HTML element.
The general form is
style="border: WIDTH STYLE COLOR"
where
WIDTH is one of thin, medium, thick, or is a distance measured in pixels
(e.g. 10px, ) or absolute units, e.g. 0.1in, 1cm, 8.2mm, 2pt, 0.3pc.
STYLE is one of none, dotted, dashed, solid, double, groove, ridge,
inset, outset
COLOR is a color as specified in the color property discussed above.
For example, we can specify a heading with a thin, solid, blue border as follows:
"border: thin solid blue; font: 24 sans serif">
Greetings
Observe that the order of the width, style, and color parameters is not impor
tant.
3.7
The width, height Property
These two properties refer to the size of the box that contains the element. These
can be expressed in distance units (as with the WIDTH property of borders
above). The width can also be exrpessed as a percentage (being interpreted as
a percentage of the width of the parent element.) For example, the following
code creates a 1x2 inch blue box:
background: blue; color:black">
3.8
The margin and padding Properties
The padding is the distance between the border of an element and the content.
The margin specifies the distance between the parent and the border of an
Php Web Hosting Introduction to Interactive Web Design Php Hosting
|
|
|
|
TotalRoute.net Business web hosting division of Vision Web Hosting Inc. All rights reserved. |