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.

div height problem

  • 06-08-2009 07:11PM
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 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, Registered Users 2 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, Registered Users 2 Posts: 6,681 ✭✭✭daymobrew


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


  • Registered Users, Registered Users 2 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, Registered Users 2 Posts: 2,793 ✭✭✭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