Jump to content

3 Column Layout


rarebit

Recommended Posts

Thought this would be simple:

 

Basically the issue lies within the 'header_right' section:

 

<html>
<head>
<style type="text/css" media="all">
html {
margin: 0px;
padding: 0px;
}

body {
background: #ffffff;
color:#efefef;
font-family: arial,helvetica,geneva,sans-serif;
font-size: 14px;
margin: 0px;
padding: 0px;
}

#header_left {
width: 220px;
height: 200px;
background: #ff0000;
float: left;
margin: 1px;
}

#header_centre {
width: 400px;
height: 200px;
background: #00ff00;
float: left;
margin: 1px;
}

#header_right {
width: auto;
height: 200px;
background: #0000ff;
/*position: relative;*/
/*position: absolute;*/
/*right: 0px;*/
/*float: right;*/
margin: 1px;
margin-left: 640px;
/*padding-left: 640px;*/
}
</style>

</head>
<body>
<div id='header_wrap'>
<div id='header_left'>Header left</div>
<div id='header_centre'>Header centre</div>
<div id='header_right'>Header right</div>
</div>
</body>
</html>

 

What i'm trying for is a 3 column layout within another layer, all with a 1px margin...

But essentially the right hand column needs to fill the remainder of the width and not shove when the page is made narrower (would like a min width for it)....

 

Cheers

Link to comment
Share on other sites

I'm not sure exactly what you are trying to make, in any case applying a min-width of 820px seam to solve the problem where your division goes below when the browser-window is made smaller.

 

#header_wrap {
min-width: 820px
}

 

you should also include a valid doctype, i recommend HTML 4.01 Strict.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

Link to comment
Share on other sites

it seems to either go behind or in front of the others, or it starts after (or on next line) and is the width of the page...

 

this is the last thing I need to master to leave html behind.

 

would you mind using the example and amend to a working version, i've even just retried and it went onto the next line...

 

merci

Link to comment
Share on other sites

do you have a link  i have time and im bored so i can write the code im just trying to make sure i know what you need

 

im pictureing a full width page 

 

with 3 columns 

 

left-----------center--------right-----------------------------------

Fixed Width|||Fixed Width|||Fills entire space remaining

Link to comment
Share on other sites

http://dropfaithproductions.com/current.html 

 

<style>

 

#wrapper {min-width:800px;width:90%;margin:0 auto;}

#col1

{

float: left;

width: 20%;

height:200px;

margin-left: 1%;

display: inline;

border:1px solid #f0f;

}

 

#col2

{height:200px;width:32%;

float: left;

border:1px solid #000;

width: 30%;

margin-left: 1%;

}

 

#col3

{

float: right;

border:1px solid #f00;

width: 46%;

height:200px;

margin-left: 1%;

}

</style>

 

<body>

<div id="wrapper">

<div id="col1"></div>

<div id="col2"></div>

<div id="col3"></div>

</div>

</body>

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.