i have a div.post with #comments and a #respond form underneath it. the div.post contains the #comments and the #respond form. i simply want to float the sidebar to the right of the entire div.post and i cannot seem to get it work.

here is an example. any idea how to solve that - its probably quite simple. :)

2 Answers
2

There are several ways to handle this. However, you have not set the float property for either div#sidebar or div.inner. Try adding float: left; to both and remove the margin-left property from div#sidebar.

Edit
I just pasted this into a fiddle and thought my screen blew up. You have a number of problems with your css that go beyond simply the fix above. Most notably:

div's default to 100% width, unless you float them.

when you set margins on an element, that gets added to the width of the element (as does padding). If you want to specify fixed widths, be sure your widths + padding + margin (+ whatever is next to it) is smaller then the screen width.

Edit 2

Okay I found your problem with the sidebar rendering outside of the .inner div check the line: <input type="text" tabindex="3" size="22" value="" id="url" name="url" gtbfieldid="232"> <label for="url">Website</label> </div> Take that extra </div> out of there.