remove gaps(spaces) between web parts RRS feed

  • Question

  • I am tring to remove white spaces between web parts. Played with .ms-PartSpacingVertical, .ms-wpcontentdivspace and bunch of other classes. but I can't figure out yet. Do you have any tips? I don't see big gaps between web parts in a sharepoing page.


    Be yourself.

    Thursday, August 16, 2012 10:59 PM

All replies

  • Hi,

    Just try to add a "Content Editor Web Part" to the page. and edit--->click "Source Editor" and paste following css code-->save

    <style type="text/css"> .ms-PartSpacingVertical { margin- } .ms-PartSpacingHorizontal { width: 0px; }

    #_invisibleIfEmpty {

     padding: 0px;



    Let us know your result now

    Cheers, Hemendra-MCTS "Yesterday is just a memory,Tomorrow we may never see"

    Monday, August 20, 2012 1:09 PM
  • it doesn't work for me. I have another sharepoint instance which doesn't have space between web parts. is this something to ge overwritted by parent css or some site collection configuration?

    Be yourself.

    Tuesday, August 21, 2012 7:01 PM
  • Hi,

    It will overwrite your parent CSS class and it is not related to any site configuration. Can you please confirm how did you add this?

    I have edited my previous style sheet, you need to copy it and paste in content editor webpart. Make sure that you are adding content editor webpart in page where you want to remove the space.

    Let us know your result

    Cheers, Hemendra-MCTS "Yesterday is just a memory,Tomorrow we may never see"

    Wednesday, August 22, 2012 4:19 AM
  • Click on the zone that the web parts are part of and then Edit the HTML

    Remove all instances of <p></p> or </br> or unncessary <div align="left"> </div> tags and &180;

    Thursday, August 23, 2012 2:11 PM
  • Try changing cellspacing and cellpadding for the webpart zone.

    Sunday, September 2, 2012 7:02 PM
  • Add the code that Hemendra gave you into a custom CSS file.

    Heather Waterman SharePoint Branding and Desgin heatherwaterman.com @hwaterman

    Thursday, September 20, 2012 6:51 PM
  • If you open it up in Designer, do you see any extra lines?

    I had some paragraph marks in mine and couldn't see them in the browser view but could see them in the designer view.


    Friday, September 21, 2012 7:22 PM
  • This isn't quite working for me. The idea is that it would affect the spacing on ALL webparts on that page right?

    For me it only seems to affect the one content editor webpart I have copied it into... ?

    Thursday, March 21, 2013 8:49 PM