1. Home
  2. Computing & Technology
  3. Web Design / HTML
Jennifer Kyrnin
Jennifer's Web Design / HTML Blog

By Jennifer Kyrnin, About.com Guide to Web Design / HTML

Walk through how to build a 3-column layout in CSS

Monday January 7, 2008
A 3-column layout is one of the hardest layouts to build in CSS, but if you think about it methodically, you can create one - and in the process learn how CSS layouts work in general. This walkthrough will take you through building a layout that is about 900px wide, with three main columns, a header, and a footer. While this layout will have a fixed-width, you could modify it to use percentages to get a flexible width layout as well.
Comments
January 7, 2008 at 9:55 am
(1) CSS Layouts says:

Thanks for the step-by-step guide :)

I have always used fixed layout like you mentioned in the guide and keep it to under 900 pixels. May I know what is your take on fluid 3-column design?

January 7, 2008 at 11:58 am
(2) Jennifer Kyrnin says:

I’m not sure what you’re asking me. If you wanted to convert this to a fluid/flexible width layout, you would change the precise numbers (890px, 300px, etc.) to percentages.

I have an article that talks about the differences between fixed-width and flexible-width (fluid) layouts: Fixed Width Layouts Versus Liquid Layouts that talks a little more about the differences and when to use them. I also created a 2-column layout template that stretches to fit the width of the screen – but at narrower widths, the second column displays below the first. I prefer that style of fluid layout because it doesn’t make the columns so narrow or wide that they are unreadable.

January 8, 2008 at 10:24 am
(3) webbare says:

very interesting… i’ dont write English very well, but this great web site Build a 3-Column Layout.

January 8, 2008 at 11:03 am
(4) Jason Champion says:

Not sure about this, but in your content ID, you’re using “top”. Doesn’t a position also have to be declared when using top?

January 8, 2008 at 12:57 pm
(5) Jennifer Kyrnin says:

Jason: I think you mis-read the CSS. I used a margin tag, and then put in comments after it “top right bottom left” – I do that to remind myself of the order of the margins in the property.

I actually don’t like using the positioning properties (top: bottom: right: left:) in my layouts, as they are so rigid. :-)

January 8, 2008 at 1:21 pm
(6) Jason Champion says:

hmmm… guess I’m confused. This is the ID that I’m referring to…

#content {
top : 0px;
margin : 0px 25% 0 165px;
padding : 3px;
color : #000000;
}

January 8, 2008 at 1:48 pm
(7) Jennifer Kyrnin says:

What page is that on? I was referring to the tutorial that this blog post was referencing. I’ll take a look at the page you’re referring to – I suspect that I forgot to remove the top: 0px; reference when I posted the page. But yes, when you use top: you need to define the position as relative or fixed, so that the browser knows.

January 8, 2008 at 2:02 pm
(8) Jason Champion says:

go here: http://webdesign.about.com/od/freewebtemplates/p/bl3columns.htm

and scroll down to the CSS link under the “The Web Site Template Data” section. You can also see the same thing if you view the source of the template.

Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

Explore Web Design / HTML
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Web Design / HTML

©2009 About.com, a part of The New York Times Company.

All rights reserved.