I have been working with the following code:
<div class="main">
<div class="babyOne">
</div>
<div class="babyTwo">
</div>
</div>
.main{
width:100%;
position:relative;
}
.babyOne,.badyTwo{
width:50%;
float:left;
}
Everything works perfectly fine with the CSS provided above.
However, when I add padding to the inner divs, it causes the user interface to break:
.babyOne,.badyTwo{
width:50%;
float:left;
padding:5px;
}
Upon inspection using fire bug, it seems that the width of the divs increases in accordance with the padding. This behavior is unexpected given the nature of the padding property. Any suggestions on how to resolve this issue?