HighDots Forums  

Positioning <input> within <td>

HTML Writing HTML for the Web (comp.infosystems.www.authoring.html)


Discuss Positioning <input> within <td> in the HTML forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
test9991014@yahoo.com
 
Posts: n/a

Default Positioning <input> within <td> - 03-20-2008 , 09:31 AM






Hi folks,

I've got something like this:

<table>
<tr>
<td>1</td>
<td align=center>
<input type=text>
</td>
<td>3</td>
</tr>
</table>

I've found that the <input> is not quite where I want it
vertically, and of course align=top & align=bottom
aren't what I want either.

So is there a way to position the <input> within
the <td> so that it is exactly X pixels below the top?

Thanks.




Reply With Quote
  #2  
Old   
Jonathan N. Little
 
Posts: n/a

Default Re: Positioning <input> within <td> - 03-20-2008 , 09:49 AM






test9991014 (AT) yahoo (DOT) com wrote:
Quote:
Hi folks,

I've got something like this:

table
tr
td>1</td
td align=center
input type=text
/td
td>3</td
/tr
/table

I've found that the <input> is not quite where I want it
vertically, and of course align=top & align=bottom
aren't what I want either.

So is there a way to position the <input> within
the <td> so that it is exactly X pixels below the top?
http://message-id.net/<ce996$47e26cc4$40cba7b3$10562 (AT) NAXS (DOT) COM>

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com


Reply With Quote
  #3  
Old   
test9991014@yahoo.com
 
Posts: n/a

Default Re: Positioning <input> within <td> - 03-20-2008 , 11:28 AM




And the answer is:

<td align=top>
<input style="margin-top: 3px;">

.... changing 3px to whatever is desired.

Reply With Quote
  #4  
Old   
Harlan Messinger
 
Posts: n/a

Default Re: Positioning <input> within <td> - 03-20-2008 , 06:28 PM



test9991014 (AT) yahoo (DOT) com wrote:
Quote:
And the answer is:

td align=top
input style="margin-top: 3px;"

... changing 3px to whatever is desired.
It's a suboptimal answer, considering you have to change it every time
you change the height of the input box or the height of the TD.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.