Skip to main content
October 17, 2014
Question

Aligning buttons to the left, center or right

Draggin the button to the right or to the left is not the ideal thing. I believe it's more useful to align to the left, center it or align to the right.  How can I do that? I don't think I have Forms 2.0.

This is how the button is output. That causes a problem when the Landing Page is shown on mobile screen.
<div class="mktoButtonRow"><span style="margin-left: 138px;" class="mktoButtonWrap mktoCupidGreen"><button class="mktoButton" type="submit">Aplique Ahora</button></span></div>
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

October 17, 2014

Swap with this code... I added the align="center" attribute. Also you could add align: center; to your marketo class's as well

<div class="mktoButtonRow" align="center"><span style="margin-left: 138px;" class="mktoButtonWrap mktoCupidGreen" align="center"><button class="mktoButton" type="submit" align="center">Aplique Ahora</button></span></div>
 
Or wrap all the code in a <center> </center> Tag :) 

Maybe that will fix it for you.
Translate
October 17, 2014
That didn't work ... it seems that align is not an atribute(it used to be for html). I can only define things with CSS because I can't wrap the content on <center> tag due to the fact that I only add the form javascript to the page. Marketo adss the form code dynamically.
Translate
October 17, 2014

<div class="mktoButtonRow" style="align: center;"><span style="margin-left: 138px;" class="mktoButtonWrap mktoCupidGreen" style="align: center;><button class="mktoButton" type="submit" style="align: center;>Aplique Ahora</button></span></div>

Try that?

Or apply
: style="align: center" to the <button> tag like this... <button style="align: center;">  

Looks like you have the closing tag in your code but I dont see the opening tag. 

Translate