nicky77
08-04-2007, 04:41 PM
Hi, I'm trying to use a 3 column layout with a different background image for each column. The only column i'll be using for content is the centre one. The way i've done it at the moment is giving me a problem as when i reduce the size of the window the centre column remains fixed, which i want, but the right hand column travels to the left at full size as i minimise the window size, and therefore obscures the centre column holding the content. Any advice on how i should tackle this problem - i would like a fluid layout ideally, but maybe a fixed layout may work better given the way i've constructed the layout so far. Any advice would be great - as i'm a bit out of my depth and am still in the early stages of learning to use CSS.
html
<CODE>
<body>
<div id="mainwrap">
<div id="contentarea">
<div id="contentarea2">
<div id="column1">
</div>
<div id="column2">
<div id="header">
<h1>ANTONINE SPORTS CENTRE</h1>
</div>
</div>
<div id="column3">
</div>
</div>
</div>
</div>
</body>
</CODE>
the css...
<CODE>
* {
margin: 0;
padding: 0;
height:100%;
}
#mainwrap{
background: url(new_background/background_middle.jpg) repeat-x;
height:100%;
}
#contentarea{
}
#contentarea2{
}
#column1{
position:absolute;
left:0px;
width:240px;
background: url(new_background/border_left.jpg) repeat-y top left;
}
#column2{
position:absolute;
margin-left:250px;
margin-right:250px;
}
#column3{
position:absolute;
right:0px;
width:240px;
background: url(new_background/border_right.jpg) repeat-y top right;
}
#header {
height:90px;
background: url(antonine_logo_rev3.png) ;
background-repeat:no-repeat;
margin-top: 60px;
}
</CODE>
html
<CODE>
<body>
<div id="mainwrap">
<div id="contentarea">
<div id="contentarea2">
<div id="column1">
</div>
<div id="column2">
<div id="header">
<h1>ANTONINE SPORTS CENTRE</h1>
</div>
</div>
<div id="column3">
</div>
</div>
</div>
</div>
</body>
</CODE>
the css...
<CODE>
* {
margin: 0;
padding: 0;
height:100%;
}
#mainwrap{
background: url(new_background/background_middle.jpg) repeat-x;
height:100%;
}
#contentarea{
}
#contentarea2{
}
#column1{
position:absolute;
left:0px;
width:240px;
background: url(new_background/border_left.jpg) repeat-y top left;
}
#column2{
position:absolute;
margin-left:250px;
margin-right:250px;
}
#column3{
position:absolute;
right:0px;
width:240px;
background: url(new_background/border_right.jpg) repeat-y top right;
}
#header {
height:90px;
background: url(antonine_logo_rev3.png) ;
background-repeat:no-repeat;
margin-top: 60px;
}
</CODE>