Jump to content


Photo
- - - - -

Setting Max Height on Hero or Text Box

responsive max-height Hero Text-Box

  • Please log in to reply
3 replies to this topic

#1 balfred1345

balfred1345

    Super Member

  • Members

  • 117 posts
  • LocationFlyover Country, USA
  • Framework Version:Some sites Pagelines Framework (latest version), some sites DMS latest version
  • Country: Country Flag

Posted 03 March 2014 - 11:45 PM

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.webhos...oh6/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



#2 James B

James B

    Advocate

  • Members

  • 5126 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 04 March 2014 - 01:42 AM

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.


  • balfred1345 likes this

#3 balfred1345

balfred1345

    Super Member

  • Members

  • 117 posts
  • LocationFlyover Country, USA
  • Framework Version:Some sites Pagelines Framework (latest version), some sites DMS latest version
  • Country: Country Flag

Posted 04 March 2014 - 06:04 PM

Thanks James.

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



#4 greenfly

greenfly

    Advocate

  • Members

  • 3268 posts
  • LocationManchester, England
  • Framework Version:latest
  • Country: Country Flag

Posted 04 March 2014 - 06:27 PM

Please let us know how you get on. 







Also tagged with one or more of these keywords: responsive, max-height, Hero, Text-Box