I have a problem and I guess there is a common solution but i didn't know how to search for it properly. I want 2 div floating next to each other, both take 50% each of the width. Now I want to give each of them some padding. What happens is, that they wrap around, instead of being displayed next to each other, because they are bigger then 50% now. What's the hack here?
some code:
#nw_main_line1_l {
height: 512px;
width: 50%;
float: left;
padding-right: 11px;
background-color: red;
}
#nw_main_line1_r {
height: 512px;
width: 50%;
float: left;
padding-left: 11px;
background-color: green;
}
What happens here is that the green one is below the red one. If i delete the paddings, everything is fine and they float like excepted.
kind regards :)