Dynamic Unbounce Page Heights?


#1

Having issues trying to make unbounce page heights dynamic,
making room for some comment timeline eg.(Facebook Comments, Disqus etc)

Anyone done this?


Issue with Facebook Comments in Unbounce's Custom HTML Object
#2

Hey Sam - I double checked with out dev team and it looks like this would be pretty tough to do. That’s not to say it’d be totally impossible, but you’d need strong javascript chops to get it done. If I come across any customers who are doing this, I’ll definitely let you know.


#3

managed to get this working perfectly for both Desktop & Mobile


#4

Hi Sam - Would you mind sharing with us how you did it? I know many of our users are looking for this very solution and would greatly appreciate this.


#5

Yes please share how you did it - I need this for Facebook comments please


#6

The following is a simple fix done with css.

Desktop Version:
Firstly, don’t drop Disqus code into the Javascript snippet area.
Instead, create a new “page section” at the bottom of your page and drop in the Disqus script as html (using the “custom html” block).

This desktop version will automatically add whatever background you have in the last page section.

Next, the following css is what I used:
(the second id “#lp-code-221” may be different for your page)

/*Auto extend page for Disqus*/
#lp-pom-root {
height: 100%;
overflow: auto;
}

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

html, body, .lp-pom-body {
overflow: hidden;
}

Mobile Version:
For mobile, it’s straight forward and basic. Just drop the Disqus script into the javascript snippet area & then add the following css:

#disqus_thread {
background-color: rgba(34,34,34,1); Use whatever background you wish
padding: 20px !important;
}

I have not yet tried Facebook comments but I’m sure this will work as easily as Disqus with similar css.


#7

Your awesome! Thanks for sharing Sam. Look out for an email from me. We want to send you something special for sharing that with the community.


#8

Thanks for this code.  I’m having trouble getting this to work now, however.  Has anything changed that would make this not work anymore?


#9

ACTUALLY… I did get it working, but I’m wondering if there is a way to get this to happen in section above the footer instead of adding a new section to the end.  Thanks in advance!!


Dynamic Section Height
#10

Hi, I’m trying to get this to work. Would you please share the code?


#11

Hi Pablo,

Dynamic page height is certainly hard to accomplish on an Unbounce page but my company has managed to pull it off for our clients.

If this functionality is really important to your particular design, you can PM me for more details.

Best,
Hristian


#12

hey @pablosotomayor, I used the code below. note that you need to change #lp-code-108 depending on the id of your html block. cheers.

lp-pom-root { height: 100%; overflow: auto; } #lp-code-108 { height: auto; }

#13

Hi Hristian!!

I need some help here please. Where do I find the ,Disqus javascript" that @Sam2 talks about? He talks about a JS and then a CSS, but posted only the CSS!!

Thanks for your help


#14

Hi @ibrudap,

You should be able to find the JS code in your Disqus account.

Here is a bit of documentation from Disqus.

Best,
Hristian