HTML and CSS Reference
In-Depth Information
bars, content, and a footer. Each of these sections could be placed in its own div container
and all of those divs enclosed in one main div .
(CSS Class Declaration)
.bigblue {
border-style: solid;
color: blue;
font-family:arial, times, serif;
font-size:32pt;color: blue;
(The HTML <div> tags)
<div class="bigblue">
This is the text in a container.
14.10.3 Absolute Positioning
The div container is not only used to change colors, borders, fonts, and so on, but it is
used for absolute or relative positioning of a block of text. For example, it allows you to
create a paragraph style independent of the <p> tag. Within the block, the <span> tags
can be used to introduce other styles.
In the following example, the <div> tag is used to create a block. It is absolutely posi-
tioned in the window at position 0,0, which is the top, left corner. Absolute positioning
allows you to place an element anywhere on the page separate from the rest of the doc-
ument. The top left corner of the document or the elements' parent originate at coordi-
nates 0,0.
.divStyle {background-color:blue;
position: absolute;
width: 250px; height: 150px;
p { color: white;
position: absolute;
left:10px; height:5px;
<div class="divStyle">
Search WWH ::

Custom Search