I have a design that I've been asked to float 2 columns either side of the main page, for adverts etc....
so now the design has 3 columns, however I cannot seem to get them to stay within the containing div.
how do you make a div float, within a div?, it seems as soom as i use float:left; it breaks out of the containing div and floats over it, how do you place floating divs relative to a containing div rather than relative to the screen?
eg..
css...
is it possible to float divs within a div?
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
so now the design has 3 columns, however I cannot seem to get them to stay within the containing div.
how do you make a div float, within a div?, it seems as soom as i use float:left; it breaks out of the containing div and floats over it, how do you place floating divs relative to a containing div rather than relative to the screen?
eg..
Code:
<div id="centerwrapper">
<div id="mainwrapper" >
<div id="side_left">
This is the left hand side
</div>
<div id="wrapper" >
<div id="header">
<div id="ram">
logo </div>
<div id="menu">
MENU goes here
</div>
</div>
<div id="mainbody">
main page goes here
</div>
</div>
<div id="side_right">
This is the righthand side
</div>
</div>
</div>
css...
Code:
/************* Container *************/
#centerwrapper {
margin: 0 auto;
border-style:solid;
border-color:blue;
}
#mainwrapper {
border-style:solid;
border-color:red;
}
#wrapper {
width: 500px;
text-align: left;
float:left;
border-style:solid;
border-color:green;
}
/************* Side Bars *************/
#side_left {
width: 100px;
height:600px;
text-align: left;
float:left;
}
#side_right {
width: 100px;
height:600px;
text-align: left;
float:left;
}
is it possible to float divs within a div?
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.