CSS- Lesson 7 - Defining a Container

Making a container is like adding a second body, everything is positioned relitive to the container, not the body. The container can help create centered layouts and really make your websites look alot better. You will see alot of professional websites using the container to make their websirte look good.

There are two code snippets needed for this, one inj the html to define the container and one in the css to position and style it. The html code is:

<div id="container>


</div>

That will create the container, use this css to style it...

#container
{
position:absolute;
top:10x;
left:150px;
width:500px;
padding 5px;
}

Now if you refresh your page you will have a container. All the text in between is positioned relatively and it looks alot better (hopefully). Again you will get best results from experimenting with the numbers.

Lesson 6- Scrollbar colours

Lesson 8- layouts in CSS