Web Part Zone “Feature”

Yes, let’s call it a feature.  Couldn’t be a bug, could it?

If you set a Web Part Zone to have a side-to-side (rather than the default top-to-bottom), i.e., horizontal layout, everything looks fine in SharePoint Designer.  However, when you go to your browser and look at the result, there will be a new table cell (TD) element on the right set to class=ms-spzonecaption with id=MSOZoneCell_emptyZoneText.  It seems to be a placeholder for a caption for the Web Part Zone of some sort.  The net result of this is that the things you want to display get "smushed" over to the left.  In the top-to-bottom layout, a corresponding <tr> does not get created.

As far as I can tell, there’s no way to eliminate this unwanted <td>, as it is not present in the code within SharePoint Designer, but seems to be generated at runtime.

One easy solution is to put your content or controls on the page outside a Web Part Zone. This means that you cannot interact with the controls through the browser.  In my case, I was building a toolbar with various links and dropdowns, so this wasn’t really a problem.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.