JS button embedded into HTML <h4> text currently separated into three lines

105 views Asked by At

I am trying to embed a Typeform into my Squarespace website using the Code embed functionality. The text within this section uses h4, and I am trying to have the text link/button as one line in the h4, but right now, it shows as 3 separate lines like the following

enter image description here

This is the code

< h4> Turn this into reality by < /h4>
        <h4 class="typeform-share link" href="https:/ / form.typeform.com / to / frLl707j " data-mode="
drawer_right " style="
color: #3A7685;text-decoration:underline;font-size:20px;" target="_blank"> taking the survey < /h4>
                <script>
                    (function() {
                            var qs, js, q, s, d = document,
                                gi = d.getElementById,
                                ce = d.createElement,
                                gt = d.getElementsByTagName,
                                id = "typef_orm_share",
                                b = "https:/ / embed.typeform.com / ";
                            if (!gi.call(d, id)) {
                                js = ce.call(d, "
                                        script "); js.id=id; js.src=b+"
                                        embed.js "; q=gt.call(d,"
                                        script ")[0]; q.parentNode.insertBefore(js,q) } })() 
                </script>
                <h4>, open until October 30th.</h4>

How do I have the entire h4 block into one line?

1

There are 1 answers

0
theGreenCabbage On

This ended up working

<h4 style="text-align: center;"> Turn this into reality by <a class="typeform-share link" href="https://form.typeform.com/to/frLl707j" data-mode="drawer_right" style="text-decoration:underline;" target="_blank">
  <h4 style="display: inline; color:#a8a6a1;">taking the survey</h4></a><script> (function() { var qs,js,q,s,d=document, gi=d.getElementById, ce=d.createElement, gt=d.getElementsByTagName, id="typef_orm_share", b="https://embed.typeform.com/"; if(!gi.call(d,id)){ js=ce.call(d,"script"); js.id=id; js.src=b+"embed.js"; q=gt.call(d,"script")[0]; q.parentNode.insertBefore(js,q) } })() </script>, open until October 30th.</h4>