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 have a Div box with an Webpartzone in it. But when i'm rendering my page, the webpartzone is to large. I thought a webpart zone has the width of 100% of his parent container. But not in my case.

    float: left;
    margin-right: 15px;
    width: 250px;   

<div class="ProjectBox"> 
   <WebPartPages:WebPartZone runat="server"  ID="Top" Title="loc:Top">
share|improve this question

you can overcome this by setting css on WebPartZone by giving it a class name and calling that is css then seting its properties to inherit.

If the parent is big then the child(WebPartZone) would also be big as its in % and at a 100 meaning it will be the full width of the parent unless stated.

So you have everything right just add to ProjectBox:

overflow: hidden;

and another .css class for WebPartZone to make the position relative :)

share|improve this answer
Changing like this: <WebPartPages:WebPartZone runat="server" class="ProjectTop" ID="Top" Title="loc:Top" > <ZoneTemplate></ZoneTemplate> </WebPartPages:WebPartZone> – Active_t Aug 15 '12 at 12:33
.ProjectBox{ float: left; margin-right: 15px; /*width: 250px; */ overflow:hidden; } .ProjectTop{ position : relative; background-color: Green; } Does not fix the problem – Active_t Aug 15 '12 at 12:34
ok thats no problem, you need to use f12 developer or firebug to see they layout of the css, if the webpart zone is sticking out of the div or the div is relative to the parent and the child so the child is still within the Div and you can see the css for the div and for the webpartzone? – ali Sharepoint Aug 15 '12 at 14:26
up vote 0 down vote accepted

My problem was that i was using an image webpart. The image loaded on the webpart wat to big. The image size i've changed with css. But in the edit mode, the image webpart is taking the size of the image, and showing the image on the right size.

It was a styling issue in combination with the imagewebpart.

share|improve this answer

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.