Reputation: 7273
I have a sidebar with a set width and height. The problem is, it's supposed to be on the right but it takes up space on the left too like a block. However, I've set the display to inline but that doesn't seem to fix the problem. How can I make the div take up no space on the left?
Part of the CSS:
div#sidebar {
float: right;
width: 256px;
height: 500px;
display: inline;
clear: none;
}
JSFiddle for the whole page: http://www.jsfiddle.net/9tW2U
Upvotes: 0
Views: 286
Reputation: 1878
The width of either #sidebar
or #mainbox
is 3px to big to fit next to each other in #page
. Take 3px of the width of #sidebar
or #mainbox
and it will fit.
By the way, display: inline
doesn't have anything to do with it because you are allready using floats.
Upvotes: 1