Grow your CSS skills. Land your dream job.

Matching Height Without the Extra DIV?

  • # May 22, 2013 at 2:52 pm

    http://codepen.io/seraphzz/pen/bikEo the code produces matching height divs, however, I don’t want the jQuery applied to every div. How do I make this only impact .one and .two?

    # May 22, 2013 at 3:00 pm

    `equalHeight($(“.one,.two”));`

    # May 22, 2013 at 3:02 pm

    Safest way would be to have a wrapping `

    # May 22, 2013 at 3:12 pm

    So, because I can add overflow:hidden to the containing wrap provided in @TheDoc ‘s code, that is probably the best option.
    Thanks everybody!

    # May 22, 2013 at 3:49 pm

    @TheDoc any idea how to make the div expand to match the height of the content when the window is resized? The text ends up going outside the DIV.

    # May 22, 2013 at 4:07 pm

    Why would you add `overflow: hidden;` to my example? Not needed.

    Here’s a little update to include the resize: http://codepen.io/ggilmore/pen/2a6374b2cefaaabc439ad65afc236605

    It’s not working inside of the pen, but I think I’m doing that right so it might just not like the iframe.

    # May 22, 2013 at 4:20 pm

    I thought it would be to achieve the resizing. It’s looking like the updated code isn’t working for resizing.

    # May 22, 2013 at 4:30 pm

    That’s why I wrote:

    > It’s not working inside of the pen, but I think I’m doing that right so it might just not like the iframe.

    # May 22, 2013 at 4:46 pm

    Aww, I apologize good sir. I was so busy in the Pen I breezed over that. You are both a gentleman and a scholar, I thank you.

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".