I know that I can use float, but here's the issue:
My wrapper is 965px wide which will contain these three div boxes. Each box is 335px wide, and has a spacing of 10px between them, so my CSS code was something like this:
I then stack the boxes in the HTML like this:
Seems simple enough, but I'm having an issue where the last box (since each one has a margin-right: 10px) makes the overall space required more than 965px, so it gets shifted to the next line. Is there some way to do this correctly so that the last box won't move to the next line?
My wrapper is 965px wide which will contain these three div boxes. Each box is 335px wide, and has a spacing of 10px between them, so my CSS code was something like this:
Code:
#wrapper {
width: 965px;
}
.box {
width: 335px;
height: 300px;
float: left;
margin-right: 10px;
}
I then stack the boxes in the HTML like this:
Code:
<div id="wrapper">
<div class="box">
</div>
<div class="box">
</div>
<div class="box">
</div>
</div>
Seems simple enough, but I'm having an issue where the last box (since each one has a margin-right: 10px) makes the overall space required more than 965px, so it gets shifted to the next line. Is there some way to do this correctly so that the last box won't move to the next line?