Centering forms on landing pages | Community
Skip to main content
August 10, 2017
Solved

Centering forms on landing pages

  • August 10, 2017
  • 1 reply
  • 5694 views

Hi,

I've downloaded a guided landing page template from the marketo product docs (Template 2-C). I'm really trying not to have to mess with the code at all, but I'm having a problem I've had many times before and thought I would ask if there was a solution. I've searched high and low for some kind of answer but haven't found anything - if you want to point me in the right direction it'd be greatly appreciated.

When I add a form to the page, even though the form widget appears to be centered, the form inside that widget always defaults to align left. No matter what I try to change in the code, it won't align. I've tried pure tables, flexbox... all the ways that I can think of or look up online to align forms, but they behave like spoiled brats for me.

I suspect I need to override some CSS in the form itself, but since the classes, ids, and mktoName for forms are hidden, there's no way to really go about learning this as far as I can tell. Brute force guessing could leave me at my keyboard until I'm 80.

Has anyone else had this problem, and what's the solution? It's really not worth my time to troubleshoot it, but my incredibly small company is incredibly picky and if that form isn't centered, I won't hear the end of it.

Message was edited by: Jacob Brissee Added image for demo purposes

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

form#mktoForm_1130 {

  margin-left: auto;

  margin-right: auto;

}

1 reply

SanfordWhiteman
New Participant
August 10, 2017

Live URL?

August 11, 2017

Hi Sanford,

Appreciate you taking a look. Here's the URL:

info.larvol.com/pharmaci-2017.html

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
August 11, 2017

form#mktoForm_1130 {

  margin-left: auto;

  margin-right: auto;

}