WEB CSS Crew : Fixing this? halp please

Discussion in 'OT Technology' started by Fearan, Mar 17, 2009.

  1. Fearan

    Fearan Guest

    I'm helping out with a website, and we're all n00bs so we can't figure the CSS out...
    712comms.ca/home.php is the current test.
    the menu is not aligned the same in IE6/7 and FF and i can't figure out why. In FF if everything is centered as it should be, then it's to the right by like 30px, then if i bring left with a margin -30px it solves it in FF and breaks it in IE.

    :x:

    Any help would be appreciated
     
  2. drpepper

    drpepper Active Member

    Joined:
    Nov 13, 2006
    Messages:
    38,076
    Likes Received:
    2
    Location:
    San Antonio
    im guessing you fixed it since i looks fine in ff 3 and ie 7
     
  3. Fearan

    Fearan Guest

    broken in FF3 here. the button menu is right by like 30px
     
  4. brds

    brds OT Supporter

    Joined:
    Jun 26, 2006
    Messages:
    17,642
    Likes Received:
    13
    Location:
    Atlanta
    The easiest way i've found to get around this problem is to put some php code in the head that determines if the user is using ie or not. If they are, you can do a statement like this:

    <div style="width:30px; <?php if (browser == "ie") echo "left:5%;"; else echo "margin:auto;"; ?> border:1px solid #000000">#CONTENT#</div>

    There's probably a more "correct" way to do this, but i found it's just easier to adjust the page for ie and !ie
     
  5. Fearan

    Fearan Guest

    I'd rather not have to do that :dunno: but if it comes down to it, I guess that's what i'll do. :sadwavey:
     
  6. brds

    brds OT Supporter

    Joined:
    Jun 26, 2006
    Messages:
    17,642
    Likes Received:
    13
    Location:
    Atlanta
    There is no absolutely correct way to do it. They look different b/c IE doesn't conform to standards... it has it's own. So it's not like you're doing something wrong - just that what looks right in IE or FF wont look right in the other most of the time. There are several "tricks" posted online for each topic (alignment, floating, ect...)
     
  7. Fearan

    Fearan Guest

    looks like the problem is that FF is pushing my list to the right, but IE is not. argg dunno how to fix it
     
  8. Fearan

    Fearan Guest

    nvm, found it, had to set margin/padding to 0 in the ul...
     
  9. Mikenotmike

    Mikenotmike

    Joined:
    Jun 1, 2001
    Messages:
    6,244
    Likes Received:
    0
    Location:
    USA
    Also something like this works without requiring php

    <!--[if IE]>
    <style type="text/css">

    #content {
    zoom:1;
    }
    .footer {
    margin-top:7px;
    }

    </style>
    <![endif]-->
     

Share This Page