+ Start a Discussion
Pete Watson 5Pete Watson 5 

Is there a way to remove the margin/padding around a visualforce page when adding to a lightning page?

Hi all, 

Is there a way to remove the whitespace around a visualforce page when you add to a lightning page? 

I've tried everything with css on the page and dont feel thats it (more than willing to be proved wrong through!) but completely out of ideas...

Many thanks in advance,

Stay safe! 

screenshot
Best Answer chosen by Pete Watson 5
Pete Watson 5Pete Watson 5
Thanks again @Abhishek. 

I ended up creating a new visualforce tab for the page (and adding the other elements to the visualforce page that where on the lightning page) opposed to adding the visualforce page to a lightning page as a component. 

All Answers

AbhishekAbhishek (Salesforce Developers) 
Pete,

Yes, it is possible.

https://salesforce.stackexchange.com/questions/255564/how-do-i-remove-the-padding-around-a-salesforce-lightning-community-page

Try the suggested workaround as mentioned in the above discussion.

Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.

Thanks.
Pete Watson 5Pete Watson 5
Thank you so much for the quick reply @Abhishek but this is from a lightning page not a community im afraid, any other ideas? 
AbhishekAbhishek (Salesforce Developers) 
Apologies Pete, I am confused.

Try this,

https://developer.salesforce.com/forums/?id=906F00000009633IAA

https://developer.salesforce.com/forums/?id=9062I000000IHx9QAG 
Pete Watson 5Pete Watson 5
Thanks again @Abhishek. 

I ended up creating a new visualforce tab for the page (and adding the other elements to the visualforce page that where on the lightning page) opposed to adding the visualforce page to a lightning page as a component. 
This was selected as the best answer
Davison VirginaDavison Virgina
Thanks for the solution navyarmyccu  (https://www.navyarmyccu.ltd/)