SOLVED

Centering forms on landing pages

Go to solution
Highlighted
Anonymous
Not applicable

Centering forms on landing pages

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

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Level 10 - Community Moderator

Re: Centering forms on landing pages

form#mktoForm_1130 {

  margin-left: auto;

  margin-right: auto;

}

View solution in original post

4 REPLIES 4
Highlighted
Level 10 - Community Moderator

Re: Centering forms on landing pages

Live URL?

Highlighted
Anonymous
Not applicable

Re: Centering forms on landing pages

Hi Sanford,

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

http://info.larvol.com/pharmaci-2017.html

Highlighted
Level 10 - Community Moderator

Re: Centering forms on landing pages

form#mktoForm_1130 {

  margin-left: auto;

  margin-right: auto;

}

View solution in original post

Highlighted
Anonymous
Not applicable

Re: Centering forms on landing pages

Thanks, Sanford. That worked, when I added to the template. It didn't work for me when adding to the form CSS, even when adding !important to override.