You are viewing limited content. For full access, please sign in.

Question

Question

Center the file upload button using CSS

asked on August 3, 2018 Show version history

Good Afternoon Everyone,

 

Hopefully there is someone out there that knows CSS much better than I do.  All I want is for the file upload button to be in the center of the form, below it's label.  Any help is much appreciated! 

 

0 0

Answer

SELECTED ANSWER
replied on August 6, 2018

Try the following

Add a CSS class to your upload field called centeredField or something along those lines

Then add the following CSS

.centeredField .cf-field {
  text-align:center;
}

As seen above, this centers the containers for the uploaded files as well, so if you don't want that you'd have to get a bit more creative with the CSS.

1 0

Replies

replied on August 6, 2018

Hi Drew,

 

You could also try adding the following CSS to the CSS and Javascript tab.

 

.fileuploader {display:block; margin:auto;}

 

This will target all of the file upload buttons on your Form, so if you have multiple uploads, they all should become centered. Also, the file will remain left-aligned.

 

Hope this helps!

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.