I have a div like this:
<div class="main">
<div class="container_1">A</div>
<div class="container_2">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam consequat diam non neque imperdiet cursus ut ut erat. Sed pellentesque congue justo, sed auctor velit posuere ac.></div>
</div>
And my css is like this:
.main div
{
float:left;
}
.main .container_2
{
width:500px;
}
.main .container_1
{
width:40px;
}
.main
{
position:absolute;
padding:5px;
color:#fff;
background-color:#365;
}
The problem I have is, when I don't use position:absolute;
on my main
div, everything is broken (you can view the example on jsfiddle. Everything works fine only if I use position absolute on the main div, but I don't wanna use position absolute because I want the main div to preseve its space in the document. Any help please?
Thank you