I have a layout similar to this jsfiddle I have created. I want to know how to get the blue div to position itself at the bottom (where the red div extends) no matter what (but not using position: fixed;
or bottom: 0;
).
How can I do this?
I have a layout similar to this jsfiddle I have created. I want to know how to get the blue div to position itself at the bottom (where the red div extends) no matter what (but not using position: fixed;
or bottom: 0;
).
How can I do this?
Check this http://jsfiddle.net/nFrp7/10/
uses a wrap div to contain all the layout divs and uses absolute positioning for blue div
Put a wrapper div
around everything and apply height:400px;
and position:relative;
to it. Then use position:absolute;
, bottom:0;
, and right:0;
on the blue div
.
hmm....
.right-main {
width: 100px;
height: 30px;
clear: both;
background-color: green;
}
Clear the left div?
Since EVERYTHING is a float, I don't think it's possible without some positioning.
Well there's this... FIDDLE UPDATE
But it does use positioning.
Ah... you're referring to the CSS 100% height problem. Check this out too: 100% Min Height CSS layout.
Try this,
.right-main {
width: 100px;
**height: 400px;**
background-color: green;
**position: relative;**
}
.bottom-right {
background-color: blue;
**position:absolute;**
**bottom: 0;**
}