I’m trying to do a blog stylish design with a “date block” to the left of parenting div. It works in IE and Chrome but in Firefox the top-parent div expands.
html
<div class="post_bg">
<div class="post_inner">
<div class="blue">date</div>
text
<br /><br />
</div>
</div>
Css
.post_bg {
width: 700px;
background-color: #f0f0f0;
outline: 1px solid #d8d8d8;
border-top: 1px solid #fff;
padding: 5px 5px 5px 5px;
}
.post_inner {
clear: both;
background-color: #fdfdfd;
border: 1px solid #d8d8d8;
}
.blue {
overflow: visible;
width: 40px;
height: 40px;
background-color: #55a4cc;
position: relative;
bottom: -5px;
right: 40px;
}
Here is a picture showing my problem:

And while I’m at it, how to I get my “text” to the top of the box?
To get the outline to work in Firefox replace:
With:
To get the text aligned to the top make
.post_innerposition: relative;and.blueposition: absolute;. Then adjust.blue‘s position accordingly.Demo: http://jsfiddle.net/ThinkingStiff/8SyGV/
CSS:
HTML: