开发者

Strange issue with asp.net ... tabpanel/Gridview moving out of table area

I am facing a strange issue with my project ... when page is rendering my tabpanel/gridview is moving out of table area. To brief: I have declared a tabpanel inside table like

<table id="table1" border="1" runat="server" width="100%">
<tr><td>
<cc1:tabcontainer .....>
<cc1: tabpanel .......>
<gridview .............>
</gridview>
</cc1:tabpanel>
</cc1:tabcontainer>
</td></tr>
<table> 

When page renders ... my tabpanel display going out of table area ... means it's half inside table and half outside table.

I thought maybe the problem is with tabpanel ... I removed the panel and just kept GridView inside table like below

<table id="table1" border=开发者_运维技巧"1" runat="server" width="100%">
<tr><td>
<gridview .............>
</gridview>
</td></tr>
<table> 

But still I am facing the same issue. Gridview rendering is moving out of the table width. I tried changing the table width and Gridview width but no luck.

It's even not the problem with CSS design ... cause Gridview in other pages are working fine.

Please help me to solve this issue.


It's most likely a CSS issue with a div in the rendered control html code.

BTW, the code looks a bit like a "use for layout abuse" of an html table - sure you can't achieve the same with just CSS?

However, if you want to keep the table and solve the issue, try the following:

  1. Copy the html code that gets delivered to the browser to your favorite text editor (make sure you use the generated code, if necessary use the Web-Developer-Toolbar add-on for Firefox)
  2. Play around with the static html (change code, save and open in browser) and narrow down to the reason for the behavior by removing everything that is NOT the reason, so that in the end you just have the table and - as I suspect - a div layer that "moves out of the table width"
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜