Please consider this image:
I can create such these divs but the problem is when one of these divs being invisible other can fill entire line.
How can i do this?
<div id="container">
<div id="left"> left</div>
<div id="right"> right</div>
</div>
CSS:
#left {
background: #aaa;
display: inline-block;
width: 49%;
}
#right {
background: cyan;
display: inline-block;
width: 49%;
}
#container {
background: red;
width: 100%
}