Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

css problem

  • 28-09-2006 10:55PM
    #1
    Registered Users, Registered Users 2 Posts: 7,516 ✭✭✭


    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, Registered Users 2 Posts: 7,516 ✭✭✭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, Registered Users 2 Posts: 2,203 ✭✭✭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, Registered Users 2 Posts: 7,516 ✭✭✭matrim


    Thanks Serbian, that fixed it


Advertisement