Avatar of BILL Carlisle
BILL Carlisle
Flag for United States of America asked on

Auto height calculations

 I figured how to size one region based on the other region size but I need to give the region a minimum size


Open in new window

checkin_amounts is a report that could be zero rows so I need charges_region to be minimum 120px
If checkin_amounts has 20 rows then charges_region grows along with checkin_amounts region (although it is a couple of px short)

How would I check $('#checkin_amounts').height() to see if it is 120px or more without a lot of code.. I could do it with a if statement etc.. but should be a shorter way. And can I add a couple px to the result if it is over 120?

Is there a way to do it as CSS ? :-)

Thank you, Bill

Avatar of undefined
Last Comment
BILL Carlisle

8/22/2022 - Mon

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
BILL Carlisle

Awesome! thank you..

How can I change this jQuery to be inline CSS?

Open in new window


#charges_region {
   height: $('#checkin_amounts').height()+2 ;
   min-height: 300px;

Open in new window

BILL Carlisle

It is good enough, the jQuery.css has a bit delay.. but the min-height did it for me.
Your help has saved me hundreds of hours of internet surfing.