• 0

Setting Max Height on Hero or Text Box


Question

Posted · Report post

Can you please tell me the best way to set a max-height so the form and the image I've placed in a Hero element can re-size responsively without getting too long as the page gets resized more narrowly.

 

I tried using Max-Height, but I assume I'm running into a float problem, because this just makes the Hero (or text box) element the max height, but doesn't scale the form and image within the Hero Unit itself.  Therefore the Hero Unit itself is smaller than the form and photo within it, and the form and photo go beyond the boundaries of the Hero Unit and overlap the content below. Obviously, not my intended result.

 

In my attempt to try the same thing in a Text Box instead of a Hero Unit, I set the max-height of the full-width section, but that also didn't do the job in that it didn't make the form and image not go more than the max-height, it just cut them off. 

 

You can take a look at the site here:

http://whub34.webhostinghub.com/~videoh6/cidev2.com/

 

I don't have Max-height setup in the Hero Unit right now due to the overlapping problem described above.

 

Thanks very much,

Bruce

Share this post


Link to post
Share on other sites

3 answers to this question

  • 0

Posted · Report post

Hi there, unfortunately you won't be able to control the height like that for that area. The form isn't set to scale based on the height like it does for some other items like the sliders for example. Looking at the way the form resizes, nothing actually scales down. The font size/field size all stay the same just move alignment to fit within the page.

 

I would say the best way to keep the form shorter would be to adjust the width of the form on the mobile layout, remove the padding/margins so it has more room and doesn't force as much content down onto the next line, or possibly reduce the font size on the mobile layout for the form if possible.

1 person likes this

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Thanks James.

I'll work on the form as suggested and use some Media Queries.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Please let us know how you get on. 

Share this post


Link to post
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