2 replies [Last post]
forum Guy
Offline
newbie
Last seen: 18 years 47 weeks ago
Joined: 2003-11-03
Posts: 10
Points: 0

I am trying to place text at the top of an input field, the styles I am using are

Quote:

.yyyyInputDiv { background-color: transparent; position: relative; top: 0px; left:0px; width: 60px;font-size:7pt;vertical-align:text-bottom;}
.yyyyDiv { position: relative; top:-4px; left:-30px; width: 50px; height: 7px; font-family:Arial, sans-serif; color:black; font-size:8pt; font-weight:bold}
.dateInput { font-family:Arial, sans-serif; color:black; font-size:8pt; font-weight: normal; background-color: transparent;

The Html layout is:
Quote:

<table>
<tr>
<td><div id="yyyyInputDiv" class="yyyyInput"><input name="yyyyInput" type="text" class="dateInput" size="6" maxlength="4"></div></td>
<td><div id="yyyyDiv" class="yyyyDiv">yyyy</div></td>
</tr>
</table>

My problem is, as I increase the size of the input field (height: 30px), the text entered into the input field moves to the top of the input, is there a way to make the text appear at the bottom?
Thanks,
FI

forum Guy
Offline
newbie
Last seen: 18 years 47 weeks ago
Joined: 2003-11-03
Posts: 10
Points: 0

Positioning text in an input field

Since I could not get the input to appear at the bottom, I changed the design; the input is at the top and the text is at the bottom.
FI

idigital
idigital's picture
Offline
newbie
Last seen: 13 years 33 weeks ago
Joined: 2004-05-08
Posts: 7
Points: 0

Positioning text in an input field

Couldn't you just use margins?