Question

Minimize margin on left side

  • 6 March 2024
  • 3 replies
  • 33 views

Badge +3

Hi! 

Using Nintex Forms, normal on the left and on the right of the forms there is quite big white margine. 

Can I replace the form in the way there’s no longer a big white margine on the left of the form so that the form begins directly on the left?

 

Thanks!!!

Jakob 

 


3 replies

Userlevel 5
Badge +13

Hi @putzjakob 

Can you advise what version of forms and sharepoint you are using? 

Also if you have a screenshot it could be helpful.

 

Jake 

Badge +3

Hi! 

We use Sharepoint 2016. 

In the picture, the black ractangle is the form, the red one the space I want to remote so that the black one is more on the left.

Is that possible?

Tanks!!!

 

Userlevel 5
Badge +13

Hi @putzjakob 

That area is typically there to ensure there is space for the side navigation for the Sharepoint like below:

 

But it appears you have a different or custom layout design such as Olso.

 

SharePoint Default [Seattle]

 

Changing to Oslo seem to work quite nicely so I would say it is more of a custom layout you are using which is based on Seattle. 

 

The correct way to address this would be to contact who is responsible for the Sharepoint layout design and request they make changes to remove the sidebar space that is not in use. 

But that doesn’t mean we cannot do anything, it is just the better more supported approach as if you follow the steps below there is no guarantee it wont stop working one day, although unlikely. 

Looking at the form code the following CSS should ensure the form correctly shows: 

 

#sideNavBox {
display:none
}

#contentBox {
margin-left: 20px; /* alter this value as needed */
}

 

The reason I ask for the form type is that the instructions are different for each form. classic and responsive. 

For a classic form it is actually very simple as we can just add the CSS to the form settings:

 

 

As you can see it is able to put the form to the left and the navbar is gone:
 

For responsive forms the instructions are a little more complex but the following instructions would actually work with both forms designers so this might actually be the better option. 

As CSS is not supported in responsive forms we need to place the CSS on the Sharepoint side instead. 

To do this you need to first open the form and then go to edit the page:
 


You need to add a script editor webpart on the page:


Then if you click EDIT SNIPPET and enter the following code (it contains style tags that is different)

<style>
#sideNavBox {
display:none
}

#contentBox {
margin-left: 20px; /* alter this value as needed */
}
</style>

 

Hit insert and stop editing
 



And the form should now show correctly. 
 



Hope this helps

Jake. 

Reply