Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

css problem

Options
  • 28-09-2006 10:55pm
    #1
    Registered Users Posts: 7,518 ✭✭✭


    Hi
    I'm in the early stages of doing a site for someone and I need some help with a css problem.

    I have some of it posted here
    The problem is that for the div of the main content if I don't specify a height in firefox the div won't expand and the red background will show.

    I know I could fix this by using javascript to set the height when loading but I would perfer a better way of doing it, if anyone has one.

    Also on the tour page in internet explorer, the flash box pushes the 2 side boxes down.

    Some of the code is a bit messed up at the moment with stuff I was trying still left there. Mainly because as I said i'm still in the early stages of design but any help would be appreciated.


Comments

  • Closed Accounts Posts: 8,866 ✭✭✭Adam


    Viewing in Firefox v.1.5.0.7 and IE 6 and they look exactly the same to me, except the div container is pushed ever so slightly to the right.


  • Registered Users Posts: 7,518 ✭✭✭matrim


    If you check it now you will see what I mean. I forgot to remove the height attribute from the "trborder" div before I uploaded it last time.


  • Registered Users Posts: 2,157 ✭✭✭Serbian


    Add the following to the bottom of your CSS File:
    /* ClearFix
    ------------------------ */
    
    .clearfix:after {
        content: "."; 
        display: block; 
        height: 0; 
        clear: both; 
        visibility: hidden;
    }
    
    .clearfix {
        display: inline-block;
    }  
    
    /* Holly Hack Targets IE Win only \*/
    * html .clearfix {height: 1%;}
    .clearfix {display: block;}
    /* End Holly Hack */
    
    Then change the following:
    Change: <div class="trborder">
    To: <div class="trborder clearfix">
    


  • Registered Users Posts: 7,518 ✭✭✭matrim


    Thanks Serbian, that fixed it


Advertisement