Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder MaDmiX's Avatar
    Join Date
    Feb 2012
    Location
    Charlotte, NC
    Posts
    162
    Thanks
    41
    Thanked 0 Times in 0 Posts

    lining up elements within a table cell

    Hi All,

    I feel silly asking this but I can't get these elements to line up. I have a text field and a graphic within a table cell. The two elements are taking up two lines within the cell. I want them to both be on the same line.

    I have tried css float, clear, position absolute, relative etc. I have tried placing the elements within <span> tags but nothing seems to work. How can I accomplish this seemingly simple (but not for me ) task?

    Code:
    <td><input type="text" id="srToIssueDate" name="srToIssueDate" size="25%" class="search" onkeyup="queryCall()"/>
          <img src="../images/cal.gif" onclick="javascript:showCalendar('srToIssueDate')" style="cursor:pointer" /></td>
    Thanks,

    Ken

  • #2
    Senior Coder
    Join Date
    Sep 2010
    Posts
    1,903
    Thanks
    15
    Thanked 226 Times in 226 Posts
    You're going very much against the grain of how table data cells work, so I'm not surprised it doesn't work. One item of data => one data cell. And tables are self aligning, so you don't generally need to do any sizing or styling. And what does size 25% mean in the input ? Size usually means the number of characters displayed, and it is just a number.
    Welcome to http://www.myphotowizard.net

    where you can edit images, make a photo calendar, add text to images, and do much more.


    When you know what you're doing it's called Engineering, when you don't know, it's called Research and Development. And you can always charge more for Research and Development.

  • #3
    Regular Coder MaDmiX's Avatar
    Join Date
    Feb 2012
    Location
    Charlotte, NC
    Posts
    162
    Thanks
    41
    Thanked 0 Times in 0 Posts
    Hi DrDos,

    Thanks for the reply. I have since abandoned the idea of the image AND the input in one cell. I was using the table to more easily line up my form elements. As for the "size 25%", that was me fussing with trying to get the sizing right but it didn't work and I forgot to remove it .

    Kind regards,

    Ken

  • #4
    New to the CF scene
    Join Date
    Jul 2013
    Location
    Bangladesh
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks a lot for this MaDmiX .hope you give us many more


  •  

    Posting Permissions

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