Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Nested Height Inheritance

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #22907
    Beaudoin
    Participant

    Hi. I’m wondering if it’s possible to inherit the height of a parent where the parent’s height is set to auto? What I would like is the child element below to size itself to the parent, but really, the content element is what sets the height. Is this possible?

    For example:

    Code:
    div#parent{
    height: auto; /* yeah yeah… I know that this is redundant since it’s the default. :-) */
    }

    div#child{
    height: inherit;
    border:#000 1px solid;
    }

    div#content{
    height:auto;
    }

    HTML:

    Code:
    Oh… the misery of floating elements.
Viewing 1 post (of 1 total)
  • The forum ‘CSS’ is closed to new topics and replies.