SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've defined two Web Part Zones in the page layout, with nothing between them.

<WebPartPages:WebPartZone runat="server" Title="Zone 1" ID="Zone1" Orientation="Horizontal"><ZoneTemplate></ZoneTemplate></WebPartPages:WebPartZone>
<WebPartPages:WebPartZone runat="server" Title="Zone 2" ID="Zone2" Orientation="Horizontal"><ZoneTemplate></ZoneTemplate></WebPartPages:WebPartZone>

I've placed a CEWP in each zone. Once the page is out of edit mode, it renders like this:

Spacing between two Web Part Zones

How can I reduce the vertical spacing highlighted by the orange arrows?

share|improve this question
up vote 3 down vote accepted

I created /Style Library/CollapsedWebPartZones.css...

.CollapsedWebPartZones table.s4-wpTopTable { 
    padding: 0px; 
.CollapsedWebPartZones table { 
    width: auto; 

... and referenced it from the top of my page layout file's PlaceHolderAdditionalPageHead content placeholder:

<asp:Content ContentPlaceholderID="PlaceHolderAdditionalPageHead" runat="server">
    <link id="CollapsedWebPartZonesStyleLink" href="<% $SPUrl:~SiteCollection/Style Library/CollapsedWebPartZones.css%>" runat="server" type="text/css" rel="stylesheet" />

Lastly, I added a class="CollapsedWebPartZones" attribute to the markup element in the page layout which contained the web part zones (a table row in my case -- <tr>).


enter image description here

share|improve this answer
Did You try it for 2013 version? – Gennady G Apr 7 '15 at 13:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.