Results 1 to 12 of 12

Thread: Text field that occupies an entire cell? [resolved]

  1. #1

    Thread Starter
    Member filburt1's Avatar
    Join Date
    Aug 1999
    Posts
    6,935

    Text field that occupies an entire cell? [resolved]

    How can I make a text field (i.e., the <input> tag) with a width such that it fills an entire <td>?
    Last edited by filburt1; Dec 30th, 2001 at 08:26 PM.

  2. #2
    Fanatic Member Wynd's Avatar
    Join Date
    Dec 2000
    Location
    In a bar frequented by colossal death robots
    Posts
    772
    Just a guess, try width="100%".
    Alcohol & calculus don't mix.
    Never drink & derive.

  3. #3

    Thread Starter
    Member filburt1's Avatar
    Join Date
    Aug 1999
    Posts
    6,935
    Didn't work.

  4. #4
    Fanatic Member Wynd's Avatar
    Join Date
    Dec 2000
    Location
    In a bar frequented by colossal death robots
    Posts
    772
    Like I said, just a guess Try length="100%" (another guess).
    Alcohol & calculus don't mix.
    Never drink & derive.

  5. #5

    Thread Starter
    Member filburt1's Avatar
    Join Date
    Aug 1999
    Posts
    6,935
    Didn't work either.

  6. #6
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    width will work in the style attribute, but try using size="100%"

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  7. #7

    Thread Starter
    Member filburt1's Avatar
    Join Date
    Aug 1999
    Posts
    6,935
    Code:
    <input style="width:100%" type="text" onKeyPress="transferKeyEvent()" name="q">
    Nope.
    Code:
    <input size="100%" type="text" onKeyPress="transferKeyEvent()" name="q">
    Nope.

  8. #8
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    strange, the style way works for me...
    Code:
    <table border="1" width="100%">
    <tr><TD>
    <input style="width:100%" type="text">
    </td><td width="5%"></td></tr>
    </table>
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  9. #9
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340
    filburt....do you test the code before you say it doesn't work??

    it works for me too

    Code:
    <form><table><tr><td style="Width:500px;"><input 
    
    style="width:100%;"></td></tr></table></form>

    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA

  10. #10

    Thread Starter
    Member filburt1's Avatar
    Join Date
    Aug 1999
    Posts
    6,935
    I'm telling you didn't work, I wouldn't lie. I'll try a more simple version in a moment...

  11. #11
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340
    post your code

    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA

  12. #12

    Thread Starter
    Member filburt1's Avatar
    Join Date
    Aug 1999
    Posts
    6,935
    I wasn't specifying the width of the cell which was the problem: adding the bold stuff made it work.
    Code:
    <table width="100%" border="0" cellspacing="0" cellpadding="3">
                    <tr>
                      <td>
                        <form name="searchForm" action="http://www.google.com/search?q=site:turtletips%2Ecom+">
                          <br>
                          <script language="javascript">
    					  <!--
    					  	function transferKeyEvent()
    						{
    							if (event.keyCode == 13)
    							{
    								event.returnValue = false;
    								submitSearch();
    							}
    						}
    					  // -->
    					  </script>
                          <input style="width:100%" type="text" onKeyPress="transferKeyEvent()" name="q">
                        </form>
                      </td>
                      <td width="75"> 
                        <div align="right"><a href="javascript:submitSearch();"><img src="searchbutton.jpg" width="70" height="27" border="0" align="absmiddle"></a></div>
                      </td>
                    </tr>
                  </table>

Posting Permissions

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



Click Here to Expand Forum to Full Width