c# - How can I display contents in the top of a table cell? -


i have contentpage has gridview display details. in masterpage have placed contentplaceholder in table cell. want display gridview adjacent top of cell. gridview displayed in middle.

here code (master page):

<asp:panel id="panel3" runat="server" backcolor="white" width="100%">           <table width="100%" style="text-align:center;">             <tr>                 <td style="width: 90%">                     <table width="100%">                         <tr >                             <td style="width: 20%;text-align:center;background-color:#eeeeee">                                 <div id="nav" class="menu">                                                 <ul>                                                     <li id="li1" class="liall" runat="server"><a href="businessopportunity.aspx"><font face="calibri">businessopportunity                                                     </font></a></li>                                                     <li id="li2" class="liall"  runat="server"><a href="ordermanagement.aspx"><font face="calibri">oerdermanagement                                                     </font></a></li>                                                     <li id="li3" class="liall" runat="server"><a href="fdtracking.aspx"><font face="calibri">fdtracking </font>                                                     </a></li>                                                     <li id="li4" class="liall" runat="server"><a href="pbg.aspx"><font face="calibri">pbg                                                     </font></a></li>                                                     <li id="li5" class="liall" runat="server"><a href="addressmaster.aspx"><font face="calibri">adressmaster                                                     </font></a></li>                                                 </ul>                                             </div>                             </td>                             <td style="background-color:#fafafa;width:78%;padding:0px">                                <div style="width:780px;margin-top:0px">                                  <asp:contentplaceholder id="contentplaceholder1" runat="server">                                 </asp:contentplaceholder>                                 </div>                             </td>                         </tr>                     </table>                 </td>             </tr>         </table>     </asp:panel> 

code (content page):

<%@ page title="" language="c#" masterpagefile="~/testmasterpage.master" autoeventwireup="true"     codefile="businessopportunity.aspx.cs" inherits="businessopportunity" %>  <asp:content id="content1" contentplaceholderid="head" runat="server"> </asp:content> <asp:content id="content2" contentplaceholderid="contentplaceholder1" runat="server">     <div class="bop" style="overflow: scroll">         <table>             <tr>                 <td>                     <asp:gridview id="gridview1" runat="server">                         <rowstyle backcolor="#ffffff" forecolor="#000000" font-size="12px" height="10px" />                         <headerstyle backcolor="#eeeeee" forecolor="#183dac" font-size="15px" height="30px" />                         <alternatingrowstyle backcolor="#c0c0c0" forecolor="#000000" font-size="12px" height="10px" />                     </asp:gridview>                 </td>             </tr>         </table>     </div> </asp:content> 

vertical-align:top; 

just add style table cell hosts gridview(on master):

<td style="background-color: #fafafa; width: 78%; padding: 0px; vertical-align: top;">     <div style="width: 780px; margin-top: 0px">         <asp:contentplaceholder id="contentplaceholder1" runat="server">         </asp:contentplaceholder>     </div> </td> 

Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -