两者在同一个table的同一tr中,本应该是水平对齐的,怎么感觉上下有些错位,同事说要用css才能解决这个问题。
不知道这个css该怎么写?
不知道这个css该怎么写?
解决方案 »
- asp.net中的ajax技术主要使用那些框架或技术点
- 刚接手一个项目,三层架构写的,访问和数量量不小,很卡,不知道怎么优化合适?
- ASP.NRT 关于JS调用后台代码如何实现?急
- 问个问题!!!!!!!!!!!!1
- 如何用正则表达式匹配任意字符啊?(汉字,英文,数字等)
- 关于Forms身份验证中,怎么根据角色进行权限验证?
- gridview 添加一列图片
- javascript问题
- 马上要考试了,几个基础选择题不明白答案,急!帮帮忙!(实在是没有分了)
- 如何得到登录机器的ip地址
- |zyciis| UserControl添加子标签后,如何给这个标签添加属性和让这个标签为List<>类型,谢谢
- 引用项目外图片的问题
<tr>
<td style="width: 225px; height: 26px;">
</td>
<td style="width: 250px; height: 26px;">
<asp:HyperLink ID="hlFirst" runat="server" Text="首页" Width="30px" ></asp:HyperLink>
<asp:HyperLink ID="hlPrevious" runat="server" Text="上页" Width="30px" ></asp:HyperLink>
第<asp:Label ID="lblpage" runat="server"></asp:Label>页 <asp:HyperLink ID="hlNext" runat="server" Text="下页" Width="30px" ></asp:HyperLink>
<asp:HyperLink ID="hlLast" runat="server" Text="末页" Width="30px" ></asp:HyperLink>
</td>
<td style="width: 225px; height: 26px;" align="right">
跳转到<asp:TextBox ID="txtpage" runat="server" Width="20px" Height="15px"></asp:TextBox>页<asp:Button
ID="btnpage" runat="server" CausesValidation="False" Font-Size="X-Small" Height="20px"
Text="确定 " Width="45px" OnClick="btnpage_Click" UseSubmitBehavior="False"/>
共<asp:Label ID="lbltotal" runat="server"></asp:Label>页</td>
</tr>
</table>
<tr>
<td style="width: 225px; height: 26px;">
</td>
<td style="width: 250px; height: 26px;">
<asp:HyperLink ID="hlFirst" runat="server" Text="首页" Width="30px" ></asp:HyperLink>
<asp:HyperLink ID="hlPrevious" runat="server" Text="上页" Width="30px" ></asp:HyperLink>
第<asp:Label ID="lblpage" runat="server"></asp:Label>页 <asp:HyperLink ID="hlNext" runat="server" Text="下页" Width="30px" ></asp:HyperLink>
<asp:HyperLink ID="hlLast" runat="server" Text="末页" Width="30px" ></asp:HyperLink>
</td>
<td style="width: 225px; height: 26px; vertical-align:middle" align="right">
跳转到<asp:TextBox ID="txtpage" runat="server" Width="20px" Height="15px"></asp:TextBox>页<asp:Button
ID="btnpage" runat="server" CausesValidation="False" Font-Size="X-Small" Height="20px"
Text="确定 " Width="45px" UseSubmitBehavior="False"/>
共<asp:Label ID="lbltotal" runat="server"></asp:Label>页</td>
</tr>
</table><td style="width: 225px; height: 26px; vertical-align:middle" align="right">让它居中
一般在这个<td>...</td>中再加一个一行三列的table,或加并列的三个DIV,
如果td必须26px,那么通过设定td的padding,把td内的内容高度限制在20px, 然后把文本框也设置成20px:<td style="width: 225px; height: 26px; padding-top: 3px; padding-bottom: 3px;" align="right">
跳转到<asp:TextBox ID="txtpage" runat="server" Width="20px" Height="20px"></asp:TextBox>页<asp:Button
ID="btnpage" runat="server" CausesValidation="False" Font-Size="X-Small" Height="20px"
Text="确定 " Width="45px" UseSubmitBehavior="False"/>
共<asp:Label ID="lbltotal" runat="server"></asp:Label>页</td>
如果实在不行,则把每个控件都放在<span></span>里,然后设置每个<span></span>的padding-top,直到达到你想要的对齐方式为止
一般在这个<td>...</td>中再加一个一行三列的table,或加并列的三个DIV,
用Css的padding来设置,只能是左右有效,而上下是无效的!!
这个去掉试试
要善用 margin-top vertical-align height line-height display:inline-block
font-size等CSS属性.