Alignment problem in Firefox

Discussion in 'CSS' started by roger_inkart, Mar 17, 2008.

  1. #1
    So, yes, I'm a total hack and I'm mixing tables with CSS but perhaps someone could help me out with this.

    Page looks great in IE:

    http://www.stock.inkart.net/amphibians/

    And ok in FF, except that after the tabs the entire page shifts to the right (as if there isn't a return.)

    Anything jump out at anyone? Thanks!
     
    roger_inkart, Mar 17, 2008 IP
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #2
    #tabs6 {
    float:left;        [color=red]/*delete this*/[/color]
    width:100%;
    background:#efefef;
    font-size:93%;
    line-height:normal;
    border-bottom:1px solid #666;
    }
    Code (markup):
    cheers,

    gary
     
    kk5st, Mar 17, 2008 IP
    roger_inkart likes this.
  3. roger_inkart

    roger_inkart Peon

    Messages:
    383
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for your help! It didn't totally solve the problem (I had to add a couple breaks at a temp fix) but it put me on the right path.

    Gave you some Rep and visited your website BTW.
     
    roger_inkart, Mar 18, 2008 IP
  4. roger_inkart

    roger_inkart Peon

    Messages:
    383
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Does anyone know if it's possible to hide code from IE? I had to add <br><br> to trick Firefox into placing the table underneath the tabs, but in IE there's now a weird looking gap:

    http://www.stock.inkart.net/reptiles/

    I know you can use the conditional comments like <!--[if IE]> but I was curious if there was some way to hide those two breaks from IE?

    Thanks!
     
    roger_inkart, Mar 18, 2008 IP
  5. rchamberlin

    rchamberlin Peon

    Messages:
    81
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Add:

    margin-bottom: 10px;
    Code (markup):
    to your #tabs6 CSS (you can change the 10px to whatever you want/need) and take the BR tags out.
     
    rchamberlin, Mar 18, 2008 IP
  6. roger_inkart

    roger_inkart Peon

    Messages:
    383
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Thanks for the good input, but the problem isn't the breaks themselves but rather Firefox not seeing a 'return' after the category tabs. Right now I'm fooling it into placing the rest of the page under the header by adding the breaks. If I take out them out the table shifts far to the right to directly after the tabs.

    Again, it looks ok in IE without the breaks. And ok in FF with them. I was wondering if I could hide the breaks from IE? Or is that crazy?
     
    roger_inkart, Mar 18, 2008 IP
  7. rchamberlin

    rchamberlin Peon

    Messages:
    81
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Ok the reason that's happening is because you're floating the links in the #tabs6 UL. So in order to fix that, you need to clear the table that follows it. So where you have:

    <br /><br /><table style="width: 750px">
    Code (markup):
    Change that to:

    <table style="width: 750px;clear: both">
    Code (markup):
    And that will give you the "return" you are looking for.

    You should try to get ALL of your CSS into the styles.css file, just as an FYI.
     
    rchamberlin, Mar 18, 2008 IP
    roger_inkart likes this.
  8. roger_inkart

    roger_inkart Peon

    Messages:
    383
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Brilliant! Thanks very much for your help. Positive rep given!
     
    roger_inkart, Mar 18, 2008 IP