Jump to content

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


Watchout4Avalanches

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...