homepage Welcome to WebmasterWorld Guest from 54.226.252.142
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
IE div positioning woes
listenmirndt




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

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




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

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]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved