This part of the tutorial will be designed to show you how to make the content wrapper and the left and right elements of the page. It is very easy.
Step 1) Using the previous code we need to create a wrapper that will contain the left and right parts of the content. Apply the following style.
This makes sure the overall dive stretches as the content grows.
To make the wrapper add the following code underneath the header wrapper as shown below.
So it looks like this.
This means that the content wrapper is underneath the header but still located in the wrapper div. There is no need to give this div any properties, it is just used to hold the next elements in. It also makes it easier to re find code because you can easily search for the content wrapper.
Step 2) The next step is to make the left and right div for use as the main content and sidebar content respectively. We first need to make a new style for each of the elements. I'm deviating from the original plan slightly. In the image I whipped up I had the main div inside another div, this is not needed. So I am leaving it out.
The style for the left and right divs are shown respectively. They are pretty much similar.
Notice the "float" syntax this will be used to float the div's left and right respectively. You can name the div's to something more suitable such as sidebar. I've used those names for clarity. You need to make sure the widths are correct and add up to the size in you sidebar, otherwise there will be elements all over the place. You also need to make sure that display:block is displayed so the div fills all the way up when something is added.
Step 3) The next step is to add in the div's. They both need to be added inside the content div. As shown below. Tabs haves been added for clarity.
If you view it you wont see anything. This will be solved in the next step.
Step 4) In the wrapper style remove the height syntax line and add in teh overflow line. It should now look like this.
Step 5) All you now need to do is add some text between the id and the end of the div tag as shown below.
This is left Text
This is right hand text
The more you add the bigger the div will come and we are in business.
You don't no how long I spent trying to make the wrapper div stretch, the problem was down to the floating elements and as a result the outer wrapper div was not playing ball. I found out how to do it eventually from here.
The next tutorial will be making it look more pretty.