Is there any way to resize forms in firefox using css, it doesnt seem to work for me.
Printable View
Is there any way to resize forms in firefox using css, it doesnt seem to work for me.
You can control size using css. Can you show us what you're using?
Sure, you could set the dimensions of all your input fields using,
however this would set the dimensions of all input fields, text, password, checkboxes etc... which isn't ideal. if you don't care about IE 6 and older you can use attribute selectors to specify different types of input fields,Code:input {
width: 200px; height: 25px;
}
This should be supported in IE 7, Opera, Mozilla, Safari etc...Code:input[type="text"] {
width: 200px; height: 25px;
}
input[type="checkbox"] {
width: 15px; height: 15px;
}
On the other hand (and most likely) if you do need to cater for IE 6 and older, you can add a class attribute to your input fields and then use the class selector in your CSS to control which styles are applied to which input fields,
where cb is a class for all the fields you want to make 15px by 15px and txt is a class on the fields you want to make 200px by 25pxCode:input.txt {
width: 200px; height: 25px;
}
input.cb {
width: 15px; height: 15px;
}
<input type="text" class="txt" value="Hello">
<input type="checkbox" class="cb" value="1">
textareas are treated separately to the other input fields, they just need something like,
Code:textarea {
width: 400px; height: 300px;
}