Jump to content

Getting The Height Of An Element With A Height Of 'auto'


Recommended Posts

I'm designing a web page that has boxes that you can click to make slide open and close. However, I don't know how to get the height of an element when it is defined in an external style sheet, or if it is 'auto'.The problem is that I can't get the boxes to slide back to their original size. I have to make an argument in the function, and then guess what size the box actually is. This isn't desirable because the JavaScript functions I have made will be used in many parts of this project, and eventually, many parts of the page will be dynamic.Is there a way to determine the height of an element if it has a height of 'auto', or has the height residing in an external style sheet?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...