To achieve the desired effect of having the orange container stick to the bottom of the blue container, you can consider adding content to the orange container and adjusting its position using CSS properties like position: absolute
or margin-top
, depending on your HTML structure.
You can then place the header (green) container inside the orange container and position it absolutely at the top with a percentage value of -100% (the orange container's positioning should be either absolute
or relative
).
If you provide your HTML code, it will be easier to offer a more tailored solution.
Here is a JSFIDDLE example demonstrating this concept
CSS:
.box{
background: #f00;
height: 150px;
width: 100%;
position: relative;
padding: 20px;
padding-bottom: 0;
}
.column{
background: #0f0;
width: 30%;
position: relative;
top: 100%
}
.header{
position: absolute;
bottom: 100%;
width: 100%;
background: #00f;
}
HTML:
<div class="box">
<div class="column">
<div class="header">
header
</div>
aaaaaaa<br/>
aaaaaa
</div>
</div>