The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Programming Fundamentals" Dec 02 - 2:00 PM Eastern

How to get the height of a div that has no id but multiple classes?

  • # January 7, 2013 at 3:52 am

    I need to get the height of a div that has three class namely a , b, c
    i.e. `


    I tried using `$(‘a b c’).height();` but this returns null.

    I need to use Jquery for this. Solution using only JS is also welcomed.

    # January 7, 2013 at 3:55 am

    This reply has been reported for inappropriate content.

    the $() accepts a css selector. So you would target it with:


    # January 7, 2013 at 6:20 am

    Thanks jamy_Za

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

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed