Question

Set lightbox height to dynamically adjust to custom HTML height within?

  • 27 February 2024
  • 1 reply
  • 20 views

Badge

Fairly straightforward - we have a Squarespace Scheduler booking form that is embedded via custom HTML on a lightbox when the user clicks “Book Now” on the page.

That custom HTML has its height automatically adjusted with a bit of CSS:

#lp-code-NUM { height:auto;}

However, the height of the lightbox does not dynamically adjust if we use this same CSS solution with the #lp code for the lightbox root.

How can we have the lightbox adjust its height to fit the embedded custom HTML? The height of the embed adjusts depending on timeslot availability for booking, it is not a static height.


1 reply

Userlevel 7
Badge +3

Hi @GNI

Due to the way the Unbounce builder puts together pages/lightboxes you’ll need to adjust the lightbox manually. 

Meaning you’ll have to set the lighbox height to the max value you think you might need. 

This would leave some/a lot of white space when the content doesn’t expand to fully fill it. 

 

Reply