how to render webpart use DIV ?

G

Guest

When I add a WebPartZone on my page, this control will rendered using <table>
like this :

<table cellspacing="0" cellpadding="0" border="0" id="WebPartZone1">
<tr>
<td style="height: 100%;">
<table cellspacing="0" cellpadding="2" border="0" style="width:
100%; height: 100%;">
<tr>
<td style="height: 100%;">
</td>
</tr>
</table>
</td>
</tr>
</table>

and then I add a label as a webpart we will see the source code like this

<table cellspacing="0" cellpadding="0" border="0" id="WebPartZone1">
<tr>
<td style="height: 100%;">
<table cellspacing="0" cellpadding="2" border="0" style="width:
100%; height: 100%;">
<tr>
<td>
<table class="WebPartZone1_0" cellspacing="0"
cellpadding="2" border="0" id="WebPart_gwpLabel1"
style="width: 100%;">
<tr>
<td>
<table cellspacing="0" cellpadding="0"
border="0" style="width: 100%;">
<tr>
<td id="WebPartTitle_gwpLabel1"
style="width: 100%; white-space: nowrap;">
<span
title="Untitled">Untitled</span> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="padding: 5px;">
<span
id="WebPartManager1_gwpLabel1_Label1">HAHA</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="padding: 0; height: 100%;">
</td>
</tr>
</table>
</td>
</tr>
</table>

By this auto-created html code, we get the same style of the webpart. but if
I want to use DIV instead of TABLE to render the WebPartZone how can I do ?
thank you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top