Jump to content

3 column layout


hyster

Recommended Posts

hey guys

im trying to get a 3 column layout to be used with php inside the columns. I have put all the columns inside a container div as I want a solid background to it while the main page has an image.

the middle column will extend the container div as im using position:inherit but I cannot get the side columns to use position:inherit else it push's each column under the previous 1.

the 2 side columns will extend depend on the php and the middle column will have several other blocks inside it depending on what news is in the database.

sorry if this is confusing. I hope the code will make it clearer

as u can see from the code the left colum goes outside the container div. I need the container div to stretch with all the columns.

thx for any help.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
#header {
	margin-left:auto;
  margin-right:auto;
  margin-bottom:10;
	width:1130px;
	height:200px;
	top: 19px;
	border:2px solid;
 border-radius:25px;
}
#content{
	margin-left:auto;
  margin-right:auto;
  margin-bottom:10;
	width:1130px;
	border:2px solid;
  border-radius:25px;
 	height:auto;
 	border-color:red;
}

#leftcol {
	margin-top: 10px;
	position:absolute;
	width:230px;
	height:900px;
	top: auto;
	border:2px solid;
	border-radius:25px;
	margin-left:0px;
}
#rightcol {
	margin-top: 10px;
	position:absolute;
	width:230px;
	height:600px;
	top: auto;
	border:2px solid;
	border-radius:25px;
	margin-left:900px;
}

#wotnews {
	position:inherit;
	width:650px;
	height:200px;
	z-index:1;
	top: 200px;
	margin-left: auto;
	margin-right: auto;
	margin-top: 10px;
	border:2px solid;
	border-radius:25px;
}

#tcres {
	position:static;
	width:650px;
	height:200px;
	z-index:2;
	top: auto;
	margin-left: auto;
	margin-right: auto;
	margin-top: 10px;
	border:2px solid;
	border-radius:25px;
}

#news {
	position:static;
	width:650px;
	height:200px;
	z-index:3;
	top: auto;
	margin-left: auto;
	margin-right: auto;
	margin-top: 10px;
	border:2px solid;
	border-radius:25px;
}

#cellhead {
	position:static;
	width:inherit;
	height:40px;
	z-index:1;
	border:2px solid;
	border-radius:25px;
	margin-top:-22px;
	border-color:blue;
}
-->
</style>
</head>

<body>
<!--header-->
<div>

  <div id="header">header</div>
</div>
<!--content-->
<div id="content">
    <!--left colum-->
    <div id="leftcol">left
    <div id="cellhead"></div></div>
    
        <!--right colum-->
      <div id="rightcol">right
      <div id="cellhead"></div></div>
        <!--top box-->
        <div id="wotnews">wot news
        <div id="cellhead"></div></div>
        
        <!--2nd box-->
        <div id="tcres">tc results
        <div id="cellhead"></div></div>
        
        <!--3rd box-->
        <div id="news">clan news
        <div id="cellhead"></div></div>

</div>
</body>
</html>

 

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.