HTML and CSS Reference
In-Depth Information
Table 14.10 Margin and Border Properties (continued)
Elements
Affected
Property
Value/Example
border-left-width
thin, medium, thick, 3em
All
border-right
<border-right-width> or <border-style> or <color>
All
border-right-width
thin, medium, thick, 1cm
All
border-style
[none], dotted, dashed, solid, double, groove,
ridge [ inset,outset ]{1,4}
All
border-top
<border-top-width> or <border-style> or <color>
All
border-top-width
thin, medium, thick, 3em
All
border-width
thin, medium, thick, .5cm
All
margin
5em, 3em, 2em, 1em (top, right, bottom, left)
All
margin-bottom
100px, 50%
All
margin-left
.5in, 40%
All
margin-right
20em, 45%
All
margin-top
1cm, 20%
All
padding
2em, 4em, 6em (right, bottom, left)
All
padding-bottom
2em, 20%
All
padding-left
.25in, 20%
All
padding-right
.5cm, 35%
All
padding-top
20px, 10%
All
EXAMPLE 14.8
<html>
<head><title>Margins and Borders</title>
<style type="text/css">
1
body { margin-top: 1cm; margin-left: 2cm ;
2
margin-bottom: 1cm; margin-right: 2cm;
3
border-width: thick;
border-style:solid;
border-color: red blue green yellow; padding:15px;
}
 
Search WWH ::




Custom Search