Centering a form on SharePoint

  • 4 January 2017
  • 5 replies
  • 3 views

Badge +1

Hi all,

This is probably a really stupid question but how do I get my form to center on my page?

I have tried using the dev tools on chrome to find a css class to do this but I can't seem to find the right one.

Here is an example of a class I tried to do this on.

 .nf-Formfiller{
text-align: center;
}

Right now I have it centered by increasing the width of the form to match my screen and then centering the form contents manually.  However this only works for computers that have the same screen resolution as mine.

I would love some help figuring this out.  Thanks in advance!

P.S. Let me know if this is the wrong place to post this type of question.


5 replies

Userlevel 5
Badge +14

try

#contentBox{

  display: table;

  margin: 0 auto;

}
Badge +1

Worked great!  Thanks a ton!

Badge +7

I added 

.nf-non-dialog-outer {margin-right: 50%; margin-left: 50%;}

at the end of the custom-css-setting in my form. This will center the form within the content-box of sharepoint.

Badge

It worked for me. I added it to the end of the Custom CSS of the form. Below are the steps.

- Open the Form

- Click on NINTEX FORMS 2016 - Settings

- Expand Custom CSS and add the code above

Badge +2

...thanks for the solution!

 

Worked perfectly. This will come in very handy

Reply