ASP.NET - td align

Asked By msakt on 29-Dec-11 05:01 AM
<td>
<asp:panel>
</panel>
<asp:label id="f" runat="server">

</td>
the above td have panel and lable.....panel values are bind in top of td adn lable value bind in bottom of td...how?
smr replied to msakt on 29-Dec-11 05:20 AM
hi

just apply css for those two.

Use "TOP" property for that
Suchit shah replied to msakt on 29-Dec-11 05:36 AM
You can do it like below one

use style propery of both control

<table width="100%">
     <tr>
       <td>
         <asp:Panel id="pnl1" runat="server" style="top:0'"></asp:Panel>
         <asp:Label ID="lbl1" runat="server" Text="test" style="bottom:0px"></asp:Label>
       </td>
     </tr>
   </table>
Web Star replied to msakt on 29-Dec-11 05:39 AM
if you want to just label comes below the panel control the use one <BR> between both control as follows

<td>
<asp:panel>
</panel>
<BR>
<asp:label id="f" runat="server">

</td> 

But if you want panel on top and label on bottom and if td height it too much than
the best way, you should place another table in that td as follwos.

<td>

<table>
<tr>
<td valign="top">
<asp:panel>
</panel>
</td>
</tr>
<tr>
<td valign="bottom"> 
<asp:label id="f" runat="server">
</td>
</tr> 


</td> 
dipa ahuja replied to msakt on 29-Dec-11 05:51 AM
use the td's Valign=Top