Reputation: 3875
Just how can I make my page look like this:
When the left, and right (the upper divs
When A and B's height is unknown (well, the one who has most content will decide on how down below C is)
Thanks in advance
Upvotes: 2
Views: 19317
Reputation: 11
You can make it inline with following example for right alignment:
<div style="width:30%;float:right"><!--write your required tags--></div>
Here width and float varies depending on the requirement
Upvotes: 1
Reputation: 32182
Hi you can make this simply as like this
Css
#left {
width:100px;
min-height: 300px;
background:red;
float:left;
}
#right {
min-height:200px;
background:blue;
float:left;
width:400px;
}
#bottom{
height:200px;
background:green;
clear:both;
}
HTML
<div id="left"></div>
<div id="right"></div>
<div id="bottom"></div>
Live demo link here http://jsfiddle.net/rohitazad/AHk78/2/
Upvotes: 0
Reputation: 18008
CSS:
#divA
{
float:left;
width: <width of div A>;
}
#divB
{
float:left;
width: <width of div B>;
}
#divC
{
clear:both;
}
HTML:
<div id="divA"></div>
<div id="divB"></div>
<div id="divC"></div>
Upvotes: 1
Reputation: 2299
I would make the sections percentages, that way you get these proportions no matter what screen size the user has.
#sectionA { float:left; width: 20%; } #sectionB { float:left; width: 80%; } #sectionB { clear:both; width: 100%; }
<div id="sectionA"></div> <div id="sectionB"></div> <div id="sectionC"></div>
Upvotes: 4
Reputation: 60516
HTML
<div id="upleft"></div>
<div id="upright"></div>
<div id="below"></div>
CSS
#upleft { width:100px; height: 500px; background:red; float:left; }
#upright { width:300px; height:200px; background:blue; float:left }
#below { height:300px; width:100%; background:green; clear:both }
Upvotes: 3