Click here to Skip to main content
12,747,154 members (29,043 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: ASP.NET
<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 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;
             }
Posted 5-Feb-13 3:16am
ujali450
Comments
Ankur\m/ 5-Feb-13 8:21am
   
Does both your 'td' belongs to single 'tr' or are they in different tr's?
ujali 5-Feb-13 8:22am
   
both td are in single tr
ujali 5-Feb-13 8:26am
   
both td are in single tr
Ankur\m/ 5-Feb-13 8:27am
   
In that case the html code is fine. Use Firebug to see what style is breaking. Or we will have to see the actual page to help you out.
Krunal Rohit 5-Feb-13 8:54am
   
Try using CSS
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 5

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>
so make split.and do like above.
  Permalink  
v2
Comments
ujali 7-Feb-13 1:18am
   
the problem is solved..
CShubham 7-Feb-13 1:23am
   
good
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  
v3
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

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;
         }
  Permalink  
v3
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 6

use ctrl K+D for formating text.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.170215.1 | Last Updated 7 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100