Click here to Skip to main content
Rate this: bad
good
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 2:16am
ujali428
Comments
Ankur\m/ at 5-Feb-13 8:21am
   
Does both your 'td' belongs to single 'tr' or are they in different tr's?
ujali at 5-Feb-13 8:26am
   
both td are in single tr
Ankur\m/ at 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.
ujali at 5-Feb-13 8:22am
   
both td are in single tr
Krunal Rohit at 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 at 7-Feb-13 1:18am
   
the problem is solved..
CShubham at 7-Feb-13 1:23am
   
good
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 6

use ctrl K+D for formating text.
  Permalink  
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

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

  Print Answers RSS
0 OriginalGriff 6,649
1 Sergey Alexandrovich Kryukov 6,270
2 CPallini 5,190
3 George Jonsson 3,574
4 Gihan Liyanage 2,522


Advertise | Privacy | Mobile
Web02 | 2.8.140916.1 | Last Updated 7 Feb 2013
Copyright © CodeProject, 1999-2014
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