SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Threaded View

  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2005
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy problem with text field and image on a same line

    Hi!

    I have a problem with puting input textbox and image on a same line. I have tryed several ways but haven't got any results.
    The idea is that there is an input text field and after that an image.
    they are in the table cell. Actually they should stay all the time in same line even if there is no space on screen and browser would like to put image under the text field.
    I tried to use floats then the text field and image is on the same line but normally the image is more up than text field.

    code sample is here:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
      <head></head>
      <style type="text/css">
        .textbox, .image {
          height: 18px;
        }
        .textbox {
          padding: 0;
        }
    
      </style>
    <body>
    
      <table>
        <tr>
          <td>
    	<input type="text" name="nupp" value="123" class="textbox" />
    
    	<img src="btn.jpg" alt="" class="image" />
          </td>
        </tr>
      </table>
    
    </body>
    </html>

    I added the picture also for a case

    All help appreciated.
    Attached Images Attached Images


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •