Welcome to WebmasterWorld Guest from 54.159.44.227

Forum Moderators: not2easy

Message Too Old, No Replies

IE div positioning woes

     

listenmirndt

7:28 am on Nov 27, 2011 (gmt 0)

10+ Year Member



This is what I am using:

<div id="box" class="box" style="position:relative; width:650px; z-index:1 display:table-cell; vertical-align:top; margin-bottom: 50px;"> 
left col here
</div>

<div id="box" class="box" style="position:relative; width:300px; z-index:1 display:table-cell; vertical-align:top; margin-bottom: 50px;">
right col here
</div>

works brilliantly in Fox and Chrome,
but IE puts the second div vertically below the first div... (chrome/fox align them left to right)

so close... but yet so far, any suggestions?

penders

3:59 pm on Nov 27, 2011 (gmt 0)

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



style="position:relative; width:300px; z-index:1; display:table-cell; ...


You are missing a semi-colon (;) after the z-index rule that is preventing the following rule from being interpreted correctly.

However, it is still going to be a problem in IE7 and earlier (if that is of concern) as I don't believe it understands display:table-cell. For this you would probably need to float the columns.

Aside... may be a typo, but you have id="box" on both your elements.

[edited by: alt131 at 7:14 pm (utc) on Nov 27, 2011]
[edit reason] Switch off smile faces [/edit]

 

Featured Threads

Hot Threads This Week

Hot Threads This Month