问题;文本框和图像按钮的对齐不是单行 [英] problem;alignment of textbox and imagebutton is not in single line

查看:60
本文介绍了问题;文本框和图像按钮的对齐不是单行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<td class="whiteboxtd">
                                               <asp:TextBox ID="txtconsul" CssClass="whitebxtxtbox" runat="server"></asp:TextBox>
                                                <asp:TextBoxWatermarkExtender ID="txtconsul_TextBoxWatermarkExtender"  WatermarkCssClass="whitebxtxtbox"

                                                    runat="server" Enabled="True" TargetControlID="txtconsul" WatermarkText="Name">
                                                </asp:TextBoxWatermarkExtender>
                                               </td>







<td valign="top">
                                                   <asp:ImageButton ID="ImageButton2" runat="server"

                                                       ImageUrl="~/images/loginBTN.png" onclick="ImageButton2_Click"

                                                        CssClass="boxsrchbtn" />
                                               </td>







i希望这个图像按钮和文本框都在一行...这里imagebutton正在进行down ..没有正确对齐textbox ..请帮助我..

这是图像按钮的CSS ..




i want this both image button and textbox should be in one line...here imagebutton is going down..its not correctly aligned with textbox..please help me..
this is css of imagebutton..

.boxsrchbtn
         {
            height:34px;
             }

推荐答案

嗨!!!

你喜欢这样。

hi!!!
you do like that.
<table>
<tr>
<td>
your text box
<td/>
<td>
your image button
<td/>
<tr/>
<table/>







如果你只有一个




if you have only one

<td></td>

所以make split.and就像上面那样。

so make split.and do like above.


检查以下项目的CSS代码并检查添加到它的高度,



whiteboxtd应用于文本框控件的td

whitebxtxtbox应用于文本框控件
Check the CSS code for following items and also check the height added in to it,

"whiteboxtd" applied to td of the textbox control
"whitebxtxtbox" applied to textbox control


除非我们能够看到你的其他CSS,否则很难分辨,但要确保你的表格行宽度足以通过设置'CSS'来保持两个< td> width''值,并尝试以下方法:



It is hard to tell unless we can see the rest of your CSS, but make sure your table row is wide enough to hold both <td>s by setting it''s CSS ''width'' value, and try the following:

.boxsrchbtn
{
   height:34px;
   display:inline;
}

.whitebxtxtbox
{
   display:inline;
}


这篇关于问题;文本框和图像按钮的对齐不是单行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆