display: block not expanding input to fill parent's width

How do I get the input to expand to the full width of the parent div? For label it worked fine. The code can be found here: http://jsfiddle.net/7h8Zg/

What makes the label expand but not the input?


If you want the inputs to be the same size as the submit button, you should add width:97% to the input rule.


change the left padding to percent, and use the rest for width, like so:

padding:0 0 0 2%;width:98%;


width: 100%;

to the input class allows the input to expand to the full size of the parent div.

JSFiddle: http://jsfiddle.net/7h8Zg/5/

Category:css Time:2011-05-26 Views:1
Tags: css

Related post

Copyright (C) pcaskme.com, All Rights Reserved.

processed in 0.266 (s). 13 q(s)