Input box 100% width?

They have: 173 posts

Joined: Feb 2005

I want my input boxes to fill the full available space. Whether that be a with a set width or a simple line with some text before it...

is there some way to accomplish this?

SonicMailer Pro - Professional mailing list manager & award-winning email marketing software
Download a FREE 30-day trial today!
Use coupon savemoreon4 and save 10%!

They have: 173 posts

Joined: Feb 2005

OR how could I make the text box automatically adjust to the width of the text in it?

Renegade's picture

He has: 3,022 posts

Joined: Oct 2002

You would have to use CSS for that. Either externally (which I recommend) or inline.

<td><input type="text" name="my_text" style="width:100%" /></td>
'

They have: 173 posts

Joined: Feb 2005

if I do 100% width, then it goes ONE HUNDRED PERCENT... not just the available space

Renegade's picture

He has: 3,022 posts

Joined: Oct 2002

Yes, it goes 100% of the available space. This has always worked for me.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.