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
The width of either
#sidebaror#mainboxis 3px to big to fit next to each other in#page. Take 3px of the width of#sidebaror#mainboxand it will fit.By the way,
display: inlinedoesn’t have anything to do with it because you are allready using floats.