At the moment you have the two columns roughly in position, although you still have some work to do to give them a proper look and feel. Aligning the two columns can be a little tricky but with your colored backgrounds in place you can see clearly where each of the two divs—leftcol and content—sit on the page.
Let's summarize the problems we have at the moment:
h1 element within the content div controls this. You need to match that margin and apply it to the top of the leftcol div.Let's fix Point 1 first. To correct the top alignment of the leftcol div, give the selector a top margin of 20px to match the top margin of the h1 selector in the content div:
#leftcol selector.{ and press Enter. Preview your page in the browser (see Figure 6).

Figure 6. The yellow leftcol div taking up its position vertically
Next, let's fix Point 2. To move the leftcol div away from the edge of the wrapper div, follow these steps:
#leftcol selector.{ and press Enter. Preview your page in the browser (see Figure 7).

Figure 7. A space of 10 pixels added to the left of the yellow leftcol div
Now you are left with Points 3 and 4 to correct, both of which involve modifying the #content selector. However, fixing Point 3 also fixes Point 4. Your first task requires moving the content div out from underneath the leftcol div. To do this you need to set a left margin within the #content selector, but by how much? A little addition quickly tells you how much margin you need:
From this you can easily deduce that you need a margin of 10 + 170 + 20 (or 200) pixels. This gives you enough distance to clear the leftcol div and allows enough room to keep your content a nice distance away from the leftcol div's right edge. These margins are, of course, personal preferences. Change them to suit your requirements.
To set the left margin on the content div, complete the following steps:
#content selector.{ and press Enter. Preview the page in your browser (see Figure 8).

Figure 8. The content div's left margin properly set—things are now taking shape!
Everything looks great. As you can see, you now have two distinct columns—which was the aim of this tutorial. However, there's a pitfall waiting just around the corner to trip you up. Locate the leftcol div in your basiclayout.html code and place the cursor between the opening and closing div tags (see Figure 9).

Figure 9. Placing your cursor between the div tags
Insert some dummy content into the leftcol div. Hold down the Shift key and press Enter. This inserts a line of <br /> tags into the leftcol div. The idea here is to make the contents of the leftcol div longer (or taller) on the page than the contents of the content div. Add enough <br /> tags to the leftcol div to make that happen. Before you preview your page, go to the basiclayout.css file and complete the following steps:
#leftcol selector.height property and value pair. It should look like this: height: 150px;Note: Just to make things quite clear, I added a background color to the #wrapper selector. As you can see in the following figures, I colored the selector orange. Follow the steps you already completed for giving the #leftcol selector a background color and apply them to the #wrapper selector.
Now preview the basiclayout.html page in your browser (see Figure 10). I added a non-breaking space into the clearing divs set in Part 3 of this tutorial and colored them green so you could see them easily.

Figure 10. The top clearing div clearing the leftcol div—but dropping out content
This is not what we wanted at all. What is going on here?
The problem occurs because I didn't clear the divs: Although they may look like they are inside the content div, they are not. They force the content div down until they can occupy a line in the browser window on their own. The position of the first clearing div is above the h2 header; below the left column, the second clearing div drops into the layout immediately below Image 2. Clearing the content in this manner will no longer work in this scenario.When you clear a float, you clear all floats—consequently all content below the first clearing div moves down beyond the floated left column.
On the next page you will see how to correct this problem.