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

div height problem

Options
  • 06-08-2009 8:11pm
    #1
    Registered Users Posts: 263 ✭✭


    hi guys I cant seem to get around this div height problem
    Basically im using floating div's as containers for info however due to dynamic height issues I cant seem to get the 2 divs to be the same height
    http://www.videopeoplecounter.com/site/faq.php
    in the link above you can see my prob the contain on the left is much bigger than the right - I have tried the right div heigh to be auo or 100% but that only works when the parent div has a height and that has to be set to auto :(:(

    I have had this prob on 3 of the last sites I have done makes my work look a little lazy any solutions


Comments

  • Registered Users Posts: 2,119 ✭✭✭p


    google 'faux columns' - it's a technique that sorts this out.
    It's not elegant, but it works.


  • Closed Accounts Posts: 18,163 ✭✭✭✭Liam Byrne


    You could also use jQuery to achieve it - add a class to all columns, loop through the columns to get the biggest height, and then set the height of the class to match that.


  • Registered Users Posts: 263 ✭✭swordsinfo


    faux columns isnt a great solution to be honest esp for most of most of my web solution as I said its dynamic height so I wouldnt know the height. This jquery could be the solution is there any links you might have for this - will google it anyhow in the meantime

    Thanks
    B


  • Registered Users Posts: 6,494 ✭✭✭daymobrew


    css-discuss wiki has a bunch of links for Any Column Longest.


  • Registered Users Posts: 2,119 ✭✭✭p


    swordsinfo wrote: »
    faux columns isnt a great solution to be honest esp for most of most of my web solution as I said its dynamic height so I wouldnt know the height.
    That's exactly the problem the faux columns technique is designed to solve.


  • Advertisement
  • Registered Users Posts: 2,790 ✭✭✭John_Mc


    As long as you know the width then Faux columns should work without any problems. I'd consider it a better solution than the aforementioned JQuery approach.


  • Closed Accounts Posts: 18,163 ✭✭✭✭Liam Byrne


    John_Mc wrote: »
    As long as you know the width then Faux columns should work without any problems. I'd consider it a better solution than the aforementioned JQuery approach.

    Ideally, yup - with you 100% on that.

    Just threw it in as a possible alternative solution.


Advertisement