Grow your CSS skills. Land your dream job.

Centered div in everything but IE

  • # April 8, 2013 at 10:53 pm

    Can anyone tell me why the page isn’t centered (left to right) in IE?

    http://www.starbuckslandscaping.com/test/gallery_plantings.html

    When I started messing with the page (not the css), the layout of the gallery got screwed up as seen here:
    http://www.starbuckslandscaping.com/test/gallery_hardscapes.html

    which makes me think there’s an open div somewhere, but I have gone over this so many times and if it’s there I just don’t see it.

    I would appreciate any help/guidance.

    # April 8, 2013 at 11:30 pm

    Your page (the first link) doesn’t have a doctype declaration at the top. Because of that, IE displays it in quirks mode.

    # April 8, 2013 at 11:39 pm

    unbelievably, you’re right. Which then throws the gallery into disarray in IE. Sigh. But I assume I can fix that with some quality time in my css.

    Thanks very much.

    # April 9, 2013 at 12:16 am

    Don’t suppose you can see a similarly stupid reason that those thumbnails are over on the right — again, only in IE?

    http://www.starbuckslandscaping.com/test/gallery_plantings.html

    # April 9, 2013 at 8:22 am

    add clear: left; to #thumbs

    # April 9, 2013 at 9:59 am

    genius! Is that something I should have for everything, not just IE? Am I just lucky it’s working in the other browsers? Someone else wrote the css for the gallery and I’ve just been modifying it.

    Thank you so much for your help. I never would have figured that out.

    # April 9, 2013 at 10:21 am

    > Am I just lucky it’s working in the other browsers?

    IE is less forgiving, basically. “Bad” code will show bad in IE, while other browsers will do some interpretation of it (and attempt to correct code errors and such).

    # April 9, 2013 at 10:32 am

    Well thanks to both of you. You’ve saved me many hours and many headaches.

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".