Question

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.

.ProjectBox{
    float: left;
    margin-right: 15px;
    width: 250px;   
}

<div class="ProjectBox"> 
   <WebPartPages:WebPartZone runat="server"  ID="Top" Title="loc:Top">
      <ZoneTemplate></ZoneTemplate>
   </WebPartPages:WebPartZone>
</div>
Was it helpful?

Solution 2

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.

OTHER TIPS

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 :)

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top