Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Aug 2014
    Thanked 0 Times in 0 Posts

    Single field form is displaying incorrectly on web page - how to fix?

    I've embedded a form built in Marketo on two landing pages on our site. I'm using the same javascript provided by Marketo for both pages (see code below). While the form appears correctly on page 1, the field label and cell appear far to the left on page 2.

    Can someone explain why this is happening and how to fix page 2 to look lik page 1?

    Page 1 code:

    [column lg="3" ] [/column] [column lg="6" md="12" sm="12" xs="12" ]<h4 style="text-align: center;"><span style="color: #000000;"><strong>HEADLINE HERE</strong></span></h4><p style="text-align: center;"><span style="color: #333333;">TEXT HERE</span><br /> <br /> <script src="//app-ab05.marketo.com/js/forms2/js/forms2.js"></script>
    <form id="mktoForm_1035"></form>
    <script>MktoForms2.loadForm("//app-ab05.marketo.com", "578-AFO-782", 1035);</script>[/column] [column lg="3" ][/column]

    Page 2 code:

    <p>[column lg="3"] [/column] [column lg="6" md="12" sm="12" xs="12" ]</p>
    <h4 style="text-align: center;">TEXT GOES HERE</h4>
    <p> </p>
    <script src="//app-ab05.marketo.com/js/forms2/js/forms2.js"></script>
    <form id="mktoForm_1035"></form>
    <script>MktoForms2.loadForm("//app-ab05.marketo.com", "578-AFO-782", 1035);</script>
    [/column] [column lg="3"] [/column]</p>

  2. AdSlot6
  3. #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Thanked 4,945 Times in 4,906 Posts
    Your page 1 code has a <p> tag with NO matching </p>

    Your page 2 code has a </p> tag with no matching <p>

    It's no wonder they render differently.

    Your page 2 code has all the [column...] stuff (whatever it is...I assume it is something used by Marketo, as it is clearly not standard HTML or CSS or JavaScript) *inside* a <p>...</p>. I think that must be wrong. I thing the </p> at the very end of the page 2 code is the match for the initial <p>, not the </p> on the same line.

    But no matter what, the differences in the <p> tags can account for the differences in layout.
    Be yourself. No one else is as qualified.


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts