Grow your CSS skills. Land your dream job.

div positioning off in IE7 and IE6

  • # October 21, 2009 at 2:45 am

    Hi i am a newbie trying to make a photogallerysite. I have two floating divs inside some wrappers and it looks well in ff, opera,safari and IE8. For some reason the right floting div gets out of position i IE6 and IE7. It is displaced about 40 px to the right and gets halfway outside the box that was meant to contain it. How should i go about solving this issue ? Any suggestions would be much appreciated. The link to the test page is here http://azoomer.com/bangkokphotography/. Here is a screenshot of the displaced div in IE7. It is the row of thumbnails to the right that is overlapping the border of the intended wrapper. [img]http://azoomer.com/bangkokphotography/IE7.jpg[/img]

    # October 21, 2009 at 3:21 am

    have you tried using a css reset? do you have one? if not, throw this is at the top of your css and see what happens.

    * { margin 0; padding: 0; }

    # October 21, 2009 at 6:24 am

    Hi cybershot. Thanks for your reply. I already have *{ margin:0; padding:0} in my main css ( unfortunately). It is a strange bug. irritating ! Maybe i will have to make some kind of conditional statement wit separate css for those IE browsers. I haven´t tried that before so i dont know how to go about it. Any suggestions ?

    # October 21, 2009 at 10:42 am

    Okay thanks anyway, but i found a solution that seem to work. I made a conditional statement like this:
    <!–[if lt IE 8]>
    <link rel="stylesheet" type="text/css" href="css/IEhacks.css" />
    <![endif]–>

    Linking to this:
    #motioncontainer{
    padding-right:58px !important;
    }
    and that seem to do the trick. Not sure if its the right way to do it, but it looks like it is working. Any corrections are welcome.

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

You must be logged in to reply to this topic.

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