Div Shifted in Firefox...

Discussion in 'HTML & Website Design' started by Mapper99, May 16, 2010.

  1. #1
    I have a simple web page. For some reason, one of my div's (holding a bing map), is shifted way off to the right and up a bit. Here is the link:

    http://70.38.38.174//where-does-this-drain-to/where-does-this-drain-go.html

    Anyone experienced this before?

    M
     
    Mapper99, May 16, 2010 IP
  2. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #2
    If you think you'll get better answers here than the other place you are greatly mistaken.
     
    drhowarddrfine, May 16, 2010 IP
  3. killerdesign

    killerdesign Peon

    Messages:
    381
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    At to that map style:

    float: left;
    margin: 40px 0px 40px 0px;

    That should fix it...
     
    killerdesign, May 16, 2010 IP
  4. Mapper99

    Mapper99 Greenhorn

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #4
    That works! Thanks...However, now it is a little messed up in Chrome....Cross browser fun for sure!
     
    Mapper99, May 16, 2010 IP
  5. killerdesign

    killerdesign Peon

    Messages:
    381
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    It's better to fix it first in FF then fixing it for other browsers. Whats wrong with it in chrome?
     
    killerdesign, May 16, 2010 IP
  6. Mapper99

    Mapper99 Greenhorn

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #6
    I needed to add a float: left; to the content I had below the map. Otherwise in Chrome, the Title of the Content showed up above the map. Thanks again for your help. I'm interested to learn why adding this float: left;margin: 40px 0px 40px 0px; fixed it though. Why did it work fine in other browsers, just not Firefox?
     
    Mapper99, May 16, 2010 IP
  7. killerdesign

    killerdesign Peon

    Messages:
    381
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Well the plugin is already floated. Since they are relative to each other, it doesn't move below, instead it moves i.e. floats to the left relative to the previous container. By adding float left, you are forcing it to move to the left diregarding the relative position of the previous container. The margins are just there to make the edges spaced out evenly.

    Yes adding a float to the next header or container will allow it to move freely to the left as well instead of overlapping in other browsers...
     
    killerdesign, May 16, 2010 IP
    Mapper99 likes this.