On 9/04/2011 5:03 AM, Brendan Miller wrote:
I have an input element inside a form. The only way I have been able
to figure out how to size it is with the html size attribute. Is there
a way to size input elements with css? It seemed like when I tried
setting the width attribute on input, it didn't have an effect.

I have the form and input inside a div of fixed width. Is there any
way to make the input to expand horizontally to fill fit the width of
the div?

<div>
<form>
<input type="text"></input>
</form>
</div>


The default display value for <input> is display: inline-block. Any width should work if you have triggered standard mode.

Try this.

input { width: 100% }




--
Alan http://css-class.com/

Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo
______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to