Replace the "add to cart" button with the "contact us" button

I want to replace the “add to cart” button with the “contact us” button. I tried it myself, but it didn’t work. After I changed the code, the picture of the product page moved down a lot. I hope the Shopify team can help me. Thank you!

My store :https://www.dectextile.com/

@hjtvslll

you have put all the wrong code as per your section i will provide a temporary solution make sure use theme default product section code much betters

  1. Go to Online Store->Theme->Edit code
  2. Asset->/theme.css.liquid->paste below code at the bottom of the file.
.product-single__photo-wrapper {
    position: relative;
}
.product-single .feature-row__image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
width: 100%;
}

Thank you for your help. This method is very good. How to add the “contact us” button

@hjtvslll

Try this

https://shopify.dev/tutorials/customize-theme-replace-add-to-cart-button

I’ve tried this one, but it’s not working.

@hjtvslll

i can do to it own code

Question,

When I followed the tutorial posted I was able to add the contact form.

However, how do i center the button?

Example:

For my main contact form i inputted the following in the theme.ccs:

#ContactForm label {
float: left;
}
form#ContactForm {
text-align: center;
}

This centered the send button.

On my form that replaces the add to cart button, the send button is not centering.

link: https://droneavenue.myshopify.com/admin/themes/124471083200/editor?previewPath=%2Fproducts%2Freal-estate-photography-videography

Suggestions?