Or, you could try something like this:
input[type=text]{width:100%}
Using this rule, you can have other types of input that won't be affected by
this rule. This only works for <input type="text" />
Bruno Souza
Front-end engineer
www.caju.nu
www.brunomacaco.com.br
On Fri, Apr 8, 2011 at 16:17, Alan Gresley <[email protected]> wrote:
> 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 [[email protected]]
> 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/
>
______________________________________________________________________
css-discuss [[email protected]]
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/