The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] Trouble in IE with Alignment

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #29570

    Yay! Another IE Issue… So, it works perfect in every other browser then, you guessed it: IE. I’m having issues with the margin: 0 auto; trait. Before someone mentions it, I’ve created a ie.css stylesheet that has:
    body{ text-align:center; }
    #page{ text-align: left; }

    I’ve tried looking through all my styles to see whats wrong, and still can’t figure it out. It’s my first time using Drupal for a full fledged site, usually I wouldn’t be having these issues but I have a feeling it’s something Drupal’s adding. Might help if I gave you the link to look at:

    Any help with this would be great. To be clear, the problem is with IE aligning EVERYTHING to the left. And I can’t seem to find where it’s happening at in my styles. And I’ve done a hard refresh in IE to make sure the cache was cleared. Thanks again for any help and anyone elses eyes!


    P.S. Code Validation is hard considering I’m using Drupal and it has plenty of CSS Stylesheets itself. I’ve tried keeping my styles validated.


    Hi John,

    For absolute positioning to work, the parent must have position: relative on it or otherwise the positioning will be relative to the page (if that makes any sense at all :) ).

    Here is the code which I added just before </head> for it to work (I was too lazy to venture through the Drupal stylesheets – and yes, I must agree with you that the Drupal styling is horrible!)


    That huge comment that you have at the top of your page before the Doctype is putting IE into Quirks mode and messing up everything. Just remove it and IE will behave :P


    Thanks, that was the issue. I didn’t realize a comment before the doctype would cause such a problem. Lesson learned :) Thanks for the help. This issue is now solved.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.