Search Our Web Design Blog...

Thursday, September 29, 2011

Web 2

PLACING A HEADER AND FLOATING AN IMAGE:

.header {
    background-image: url(header.gif);
    position: absolute;
    height: 250px;
    width: 700px;
    right: 600px;
    top: 0px;
}


How Elements Float

Elements are floated horizontally, this means that an element can only be floated left or right, not up or down.
A floated element will move as far to the left or right as it can. Usually this means all the way to the left or right of the containing element.
The elements after the floating element will flow around it.
The elements before the floating element will not be affected.
If an image is floated to the right, a following text flows around it, to the left:

Example

img
{
float:right;
}

No comments:

Post a Comment