Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

How can I prevent a WebPartZone from wrapping with <table>? For web accessibility we don't want WebParts to be wrapped in tables.

share|improve this question
1  
Can you give a few more details on "...from wrapping with ?..." A Web Part Zone will expand/contract to fit the height/width of the Web Part(s) inside of it, possibly causing. You can force the Web Part(s) to have a specific size tuned to the height/width of your users average resolution to control wrapping or scrolling. –  Craig Pilkenton Jun 10 '10 at 12:35
    
Sorry, I had written <table>, but forgot to set it as source. The main problem is that WebpartZone wrap all WebParts in a couple of tables –  eirikb Jun 11 '10 at 12:25
add comment

2 Answers

up vote 3 down vote accepted

To get rid of the HTML you can add a control adapter to your web part zone control.

Here is a link to a blog post where this is done.

share|improve this answer
    
Oh, very nice. Thanks –  eirikb Jun 11 '10 at 13:55
add comment

Unfortunately my experience is that WebPartZone always renders those tables. If you want to conform to accessibility standards, you will have to ditch web part zones.

See the accessibility section at http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.webparts.webpartzone.aspx

share|improve this answer
    
This is very bad news :( –  eirikb Jun 11 '10 at 12:25
add comment

Your Answer

 
discard

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.