My javascript countdown timer is getting cut off at the top


#1

Hello,

I’m having a problem I’ve been trying to figure out the last two days but to no avail so far, I’m hoping you can help me solve it. I’ve made a javascript countdown timer for one of my unbounce landing pages, but when I edit the HTML of the font, the top of the countdown timer gets cut off. Here’s a sample landing page I’ve made to highlight the issue:

http://unbouncepages.com/countdowntes…

I’ve put the code into a few different javascript test websites, and none of them are able to duplicate the issue, so I’m assuming it has something to do specifically with the unbounce custom html option. I can post the javascript/html I have for it if you need it.

Thanks so much.


#2

Solved it perfectly - thanks a ton Mark!


#3

Roger, can you share your javascript code with us, please?
I am looking for a good countdown example and I like yours.
Tks


#4

Hi Roger,

I’m not exactly sure why your text is being cut off at the top, but you should be able to fix this easily enough using CSS.

Try adding a style="margin-top: 20px;" attribute to the H1 element in your code.

Incidentally, it’d be best to remove the HTML and body tags as the page will already have those.

I hope that helps!