Code2Design.com

User login

The Layout

Programming

Graphic Design

Resources

Navigation

C2D Projects

Unsystematic Affiliates

Tutorials Expert Open Web Design GameXe Project 62 

Change Language

Who's online

There are currently 0 users and 10 guests online.

3-Colum Layouts

Now I know that you can make 3-Col layouts with divs at least 2 different ways.

left Middle right
----------------------
|---|----------|-----|
|...|..........|.....|
|...|..........|.....|
|...|..........|.....|
|...|..........|.....|
|...|..........|.....|
----------------------

Way 1:
Using Margins in your css:

left col---------------
float:left

middle col---------------
margin: 0 200px 0 200px

right---------------
float: right;

OR..................

Way 2:
floating the left col left, then sounding the left and middle cols in a div and floating it left and then floating the right div right.

What other ways can you make a three column layout with out using tables?


Submitted by David on November 15, 2006 - 9:47pm.
printer friendly version

Cool Site

Here is one of the best sites I found for CSS only 3 column layouts:

http://css-discuss.incutio.com/?page=ThreeColumnLayouts


3-cols

It is very easy to use HTML Kit's Div Starter 0.31, which provides a graphic way to construct a template of any complexity.

It's an old method and does not take advantage of the Clearfix technique, which will eliminate the need for the empty div(s) to create a full height column.

Here's a sample 3-column page:

<html>
<head>
<title>Untitled</title>
<style type="text/css">
<!--
.c1 {
/* col 1 */
float:left;width:99%;
}

.c2 {
/* col 1 */
float:left;width:33%;
}

.c3 {
/* col 2 */
float:left;width:33%;border-left:1px solid #000000;
}

.c4 {
/* col 3 */
float:left;width:33%;border-left:1px solid #000000;
}

.c5 {
border:1px solid #000000;
}

.c6 {
clear:both;
}

-->
</style>
</head>
<body>

<div class="c5">
<div class="c1">
<div class="c2">B-1-1</div>
<div class="c3">B-1-2</div>
<div class="c4">B-1-3</div>
</div>
<div class="c6"><!-- --></div>
</div>

</body>
</html>

Phil


Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <br> <br /> <h3>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use BBCode tags in the text, URLs will be automatically converted to links
More information about formatting options



Like what you see?

Why not add more? C2D is looking for other Christian Web Masters who would like to help write articles for this site. If you have expericance in FLASH, CSS/HTML, PHP/MySQL, PhotoShop/GIMP, Blender, Javascript, or just General Design - our users would love to hear what you have to say. Contact Us

delicious   digg   reddit   magnoliacom   newsvine   furl   google   yahoo   technorati