Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

set height,width of input textbox

Posted on 2011-05-07
5
Medium Priority
?
847 Views
Last Modified: 2012-05-11
set height,width of input textbox not textarea
0
Comment
Question by:rgb192
5 Comments
 
LVL 13

Expert Comment

by:jonahzona
ID: 35713080
Do you have any markup to give us? Maybe some parsed HTML? A lot of times an input textbox will have a class, which will affect the code that is given.
0
 
LVL 9

Accepted Solution

by:
Vampireofdarkness earned 1000 total points
ID: 35713092
<style>
input { height:100px;width:500px;background-color:red; }
</style>

<input type='text'>
<textarea></textarea>

Open in new window


input { height:[x]px/em; width:[x]px/em; }

That will set for all inputs (password, text, etc...) created by <input type='...'>. You can do the same with textarea by:

textarea { height:[x]px/em; width:[x]px/em; }
0
 
LVL 18

Assisted Solution

by:Eternal_Student
Eternal_Student earned 1000 total points
ID: 35713137
Or you could give the input boxes that you want styling a class:

 
<input type="text" class="input" id="" value="" name="" />

Open in new window


And then style them as you need:

 
<input type="text" class="input" id="" value="" name="" />

Open in new window


It's actually probably a better idea to set a font size and some padding rather than a height.
.input { height:20px;width:600px; }

Open in new window

0
 
LVL 18

Expert Comment

by:Eternal_Student
ID: 35713140
Sorry about the repeated <input /> HTML it got embedded incorrectly!
0
 

Author Closing Comment

by:rgb192
ID: 35722140
thanks
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer…
So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
Suggested Courses
Course of the Month21 days, 5 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question