Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: Div Inheritance

  1. #1
    New Coder
    Join Date
    Oct 2006
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Div Inheritance

    Problem: I have a number of divs in a div container. The divs had an auto height so that the background would adjust to the amount of text in the div. The divs are side by side in the div container. If one div has more lines than the others only its height adjusts so it looks wanky.

    Question: Is there a way to make all divs in my div container inherit the containers height and use it instead of just autoing their own?

    I do not want to use a static height because other pages with have alternate text and it will not work properly.

  • #2
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    That’s a pretty common question… the most used solution is probably

    http://alistapart.com/articles/fauxcolumns/

    and a method I've been using lately:

    http://www.positioniseverything.net/...ut/equalheight

    although it's not without its own set of problems. Hope this helps…

  • #3
    New Coder
    Join Date
    Oct 2006
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I used the second method and it worked PERFECTLY. Thank you very much. I like how you can have divs equal the height of two stacked divs as well.

  • #4
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    Glad it's working. I've used that on a few production sites and am just hoping I don't run into any of the problems mentioned in the article.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •