两个gridview的对齐
<table><tr><td>
<asp:GridView ID="gvWorkTime1_1" runat="server" AutoGenerateColumns="False"
CellPadding="2" Width="492px" Font-Names="Arial" Height="120px"
onprerender="gridView_PreRender1_1">
<Columns>
<asp:BoundField HeaderText="参观时间" HeaderStyle-Width="195" DataField="work_begin_time" >
<HeaderStyle Width="195px"></HeaderStyle>
</asp:BoundField>
<asp:BoundField HeaderText="" HeaderStyle-Width="195" DataField="end_time">
<HeaderStyle Width="195px"></HeaderStyle>
<ItemStyle CssClass="DownloadsItem" Width="60px"></ItemStyle>
</asp:BoundField>
</Columns>
</asp:GridView></td><td>
<asp:GridView ID="gvWorkTime1_2" runat="server"
AutoGenerateColumns="False" CellPadding="2" Width="495px" Font-Names="Arial"
onprerender="gridView_PreRender1_2" EnableTheming="False">
<Columns> <asp:BoundField HeaderText="入场时间" DataField="work_begin_time">
<ItemStyle CssClass="DownloadsItem" Width="350px"></ItemStyle>
</asp:BoundField>
<asp:BoundField DataField="work_end_time" HeaderText="">
<ItemStyle CssClass="DownloadsItem" Width="350px"></ItemStyle>
</asp:BoundField>
</Columns>
<PagerStyle ForeColor="Black" BackColor="White"
BorderStyle="Solid" BorderWidth="1px" Width="250px" BorderColor="Black" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView> </td></tr></table>
现在gridview2和gridview1的行数是不一样的,怎么把他们的头部对其啊。。。 asp table
[解决办法]
把第一行与十八行的<td>
改为:
<td style="vertical-align:top;">
试试。
[解决办法]
行数应该是一样的 , gridview2没给高度 gridview1给了高度 宽度也不一样 。