center button without effecting page text

Solved

center button without effecting page text

biznazz101
Shopify Partner
494 50 97

Hello, I am attempting to add a button to a product page but cannot seem to center align it without also centering all text below it on the page. I have attached screenshots and code below. I would like to center align the button so it is even with the two above it. Thanks.

 

<input type="submit" class="button" style="color:#14d46e;background-color:#0e1a4c; border:3px solid #6a6ec5;margin:-10px"" value="My Text Here" />

Capture9.PNG

Don't hesitate to reach out for more help with your store.
SEE OUR TASK STORE or check us out via our profile! FREE STORE AUDIT
Accepted Solution (1)

Ujjaval
Shopify Partner
1242 197 213

This is an accepted solution.

@biznazz101 
Try below one : 

<div class="nwtxt" style="display:flex;justify-content:center;">
<input type="submit" class="button" style="color:#14d46e;background-color:#0e1a4c; border:3px solid #6a6ec5;margin:-10px"" value="My Text Here" />
</div>

View solution in original post

Replies 4 (4)

ZestardTech
Shopify Partner
6097 1091 1465

Hello There,

Please share your store URL and password.
So that I will check and let you know the exact solution here.

Want to modify or develop new app, Hire us.
If helpful then please Like and Accept Solution .
Email: support@zestard.com
Shopify Apps URL :- https://apps.shopify.com/partners/zestard-technologies
Custom Modifications Into Shopify Theme | Shopify Private App | SEO & Digital Marketing

PageFly-Victor
Shopify Partner
7865 1786 3131

Hi @biznazz101 ,

 

This is Victor from PageFly - Landing Page Builder App.

You can try this code, I fixed it.

<div  style=" display:flex; justify-content: center;">

<input type="submit" class="button" style="color:#14d46e;background-color:#0e1a4c; border:3px solid #6a6ec5;margin:-10px" value= "My Text Here"/>

</div>


Hope this answer helps.
Best regards,
Victor | PageFly

GemPages
Shopify Partner
5625 1262 1280

Hello @biznazz101 ,

 

It's GemPages support team and glad to support you today. I would like to give you the recommendation to support you.

 

Let's try using this code:

 

<input type="submit" class="button" style="color:#14d46e;background-color:#0e1a4c; border:3px solid #6a6ec5;margin:0 auto; display: block" value="My Text Here" />

 

If you require any further information, feel free to contact me.

 

Best regards,
GemPages Support Team

GemPages - Build any high-converting store pages for any business


- If you find my reply helpful, please hit Like and Mark as Solution
- Get connected: App Store | Blog | Community | Help Center

Ujjaval
Shopify Partner
1242 197 213

This is an accepted solution.

@biznazz101 
Try below one : 

<div class="nwtxt" style="display:flex;justify-content:center;">
<input type="submit" class="button" style="color:#14d46e;background-color:#0e1a4c; border:3px solid #6a6ec5;margin:-10px"" value="My Text Here" />
</div>