|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Can anyone helpout here I have a form and want all my input & select boxes to be of equal length for neatness on the screen.
I have set my text boxes to size="35", but how can you change the length of a select box, as the size tag is for how many list items are displayed and not the horizontal lenght.
|
|
#2
|
|||
|
|||
|
This can be done using CSS.
e.g. <select style="width:35" name="test"> Cheers Steve |
|
#3
|
||||
|
||||
|
Hi
If you want to effect all input and select boxes on the screen, add a style sheet entry: Code:
<style>
input, textarea, select { width: 35; }
</style>
This would fix the size of all input, textarea and select elements without the need to change each tag MK |
|
#4
|
|||
|
|||
|
I have this same problem I can see how to change the text via the width, however the text i want spans several lines, if i change the data type to text area it no longer seems to be compatible with the database (data base is text or memo - my form is text area?)
|
|
#5
|
||||
|
||||
|
HTML code doesn't affect your database one bit
You only need to make sure that your "business logic" processes the incoming form data appropriatly for your Access database to work with it. And regarding textareas, there is no direct way to limit its maximum length (unlike <input type="text" />), instead you must resort to JavaScript |
|
#6
|
||||
|
||||
|
Quote:
Make sure to place a "px" after your pixel value. Most browsers will say "35 what? pixels? em? points? miles?" width:35px; is correct Also, the style attribute is being deprecated apparently.
__________________
If you found a post of mine helpful, please click on the on my post to add to my reputation.
|
|
#7
|
||||
|
||||
|
as a note, you do NOT need to explicitly assign a type to your integer value if you use the value 0.
width:0; is perfectly acceptable. |
|
#8
|
||||
|
||||
|
Style being depreciated?
News to me... AFAIK, its still part of the XHTML2.0 spec |
|
#9
|
||||
|
||||
|
the style attribute in tags. Not the style tag. Huge difference.
|
|
#10
|
||||
|
||||
|
The style attribute isn't depreciated, just discouraged for cross-media applications:
http://www.w3.org/TR/xhtml2/mod-styleAttribute.html#s_styleAttributemodule See? |
|
#11
|
||||
|
||||
|
interesting, I wonder what I read and where. Thanks.
|
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > How do you configure a <select> box length? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|