How to Create a Webpage with Equal Heights Columns

Create a standard layout using a DOCTYPE, a STYLE, and a DIV with two nested DIVs., Name your DIVs so that they can be worked on., Tell CSS how to manipulate these DIVs., Add some content at this point., Preview the page., Make some changes to fix...

11 Steps 1 min read Medium

Step-by-Step Guide

  1. Step 1: Create a standard layout using a DOCTYPE

    The first DIV is going to use "id"

    while the nested DIVs are going to use "class". , You make these style changes within the style tags.

    Make sure of the "#" and "." in front of the tags.

    These are important, and without them, everything breaks. , It will give you some idea as to how things are going to look as you progress.

    Add some content to the left and right DIVs. , Not only is this pretty bland, but the DIVs are not properly aligned either.

    You'll notice that "Right" is under "Left"

    not to the side of it. , Change the CSS beginning with the ID, which needs to be treated as a table.

    Set a width of 80% of the screen and centre align the whole box. , Create a border around the two, so that you can see how this is all going to pan out. ,, You'll see that no matter how big the box on the left gets, the box on the right retains the same size as the left one.
  2. Step 2: a STYLE

  3. Step 3: and a DIV with two nested DIVs.

  4. Step 4: Name your DIVs so that they can be worked on.

  5. Step 5: Tell CSS how to manipulate these DIVs.

  6. Step 6: Add some content at this point.

  7. Step 7: Preview the page.

  8. Step 8: Make some changes to fix this.

  9. Step 9: Make sure the two nested DIVs are now treated as table cells.

  10. Step 10: Look at the difference that's made.

  11. Step 11: Add more text into one of the cells.

Detailed Guide

The first DIV is going to use "id"

while the nested DIVs are going to use "class". , You make these style changes within the style tags.

Make sure of the "#" and "." in front of the tags.

These are important, and without them, everything breaks. , It will give you some idea as to how things are going to look as you progress.

Add some content to the left and right DIVs. , Not only is this pretty bland, but the DIVs are not properly aligned either.

You'll notice that "Right" is under "Left"

not to the side of it. , Change the CSS beginning with the ID, which needs to be treated as a table.

Set a width of 80% of the screen and centre align the whole box. , Create a border around the two, so that you can see how this is all going to pan out. ,, You'll see that no matter how big the box on the left gets, the box on the right retains the same size as the left one.

About the Author

M

Michael Ramirez

Specializes in breaking down complex DIY projects topics into simple steps.

60 articles
View all articles

Rate This Guide

--
Loading...
5
0
4
0
3
0
2
0
1
0

How helpful was this guide? Click to rate: