Forum Moderators: not2easy

Message Too Old, No Replies

Place 2 <div>s side-by-side?!

Not to get animated, but WTH?

         

Br3nn4n

1:39 pm on Jun 22, 2008 (gmt 0)

10+ Year Member



I have tried nearly everything. I want this:

<sorry no screenshot links please>

One DIV beside a second DIV.....IS IT THAT HARD? lol

I've tried float: (left and right), absolute, relative positioning, and a lot of other stuff. I'm either getting them overlapping (tried z-index...nope!) or one is diagonally below the other (always the right box, that is)

I've tried <span> but I need the content in each box to be formatted and they won't do it for some reason.

Someone shed some light? :)

[edited by: encyclo at 8:37 pm (utc) on June 22, 2008]

Receptional Andy

1:51 pm on Jun 22, 2008 (gmt 0)



I believe you should be able to use a simple float to achieve this:

#left {float:left;}

<div id="left">Left</div>
<div>Right</div>

You can obviously set widths etc. to your liking.

Br3nn4n

2:09 pm on Jun 22, 2008 (gmt 0)

10+ Year Member



That's what I thought too....maybe I'm doing something waaay wrong or some other CSS is overriding this....I'll have a look in a bit.

Thanks for the fast response!