Jump to content

how do I change the height of an <input type="text"> box?


MikeTheVike

Recommended Posts

The input text boxes are too tall, and I want them to be shorter. I've tried so many things now my brain is turning to mush. I managed to change the height of the input boxes in Firefox and Safari, but in IE, I can't get it to budge.This is the code I've been using that works in Firefox and Safari, but not IE...

<div class="loginitem_username_input"><input type="text" size="10"/></div>

input[type="text"] {	line-height: 10px;	font-size: 10px;	maxlength: 20;}

Link to comment
Share on other sites

IE 6 won't see type=text. :)You can either use javascript to loop through all of your text inputs and asign a class that way, or give each text box and id, then create new styles for each id.
Or, rather than an id, you can assign a single class:
<style type="text/css">input.Text { background-color: red; height: 48px; }</style><input type="text" class="Text" id="username" /><input type="text" class="Text" id="firstname" />

Link to comment
Share on other sites

Or, rather than an id, you can assign a single class:
<style type="text/css">input.Text { background-color: red; height: 48px; }</style><input type="text" class="Text" id="username" /><input type="text" class="Text" id="firstname" />

Thanks!!! i think at some point in my trial and error I must have been close to this, but not close enough. Thanks everyone!!
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...