Click to See Complete Forum and Search --> : How to declare on the width of select input?


ozpo1
02-13-2006, 02:30 PM
I'm using the following code:
<span class="steps">Choose Category:</span>
<select name="Category" width="15">
I want to determine the width of of the input box, how can I do it?
Thanks in advanced, Oz.

Wisest Guy
02-13-2006, 02:34 PM
<SELECT NAME="Category" STYLE="WIDTH:15;">

ozpo1
02-13-2006, 02:44 PM
I appreciate it!

ozpo1
02-13-2006, 02:49 PM
I tried it, but there was no different, any aother idea?

Kravvitz
02-13-2006, 03:20 PM
He forgot the units.
<select name="Category" style="width:15px;">

mitr
02-13-2006, 04:51 PM
I suggest you use a CSS style sheet for such things. Also, note that there should be no space between 15 and px in the above code that our friends gave. It should be as 'width:15px'.

Kravvitz
02-13-2006, 04:58 PM
If it looks like there is a space between the "15" and the "px", it's because of the way the font you are viewing it in adds extra space around bold characters.

I agree that external stylesheets are much better than inline CSS.

mitr
02-13-2006, 05:35 PM
Oh!! I don't mean that there is a space between the 15 and px in your code Kravvitz. I'm informing ozpo1 to make sure that there wouldn't be any space between them. 'cauz that causes problems with IE.

Kravvitz
02-13-2006, 05:56 PM
Oh, ok. No problem.

pcthug
02-13-2006, 06:28 PM
External stylesheets should only be used when there are multiple styles that will be used on multiple pages, if for just the occasional styling; embeded style sheets should always be used

ozpo1
02-13-2006, 08:39 PM
Thanks.

felgall
02-14-2006, 01:36 PM
External stylesheets should always be used EXCEPT for when you need to put something specific on one tag that you know will never need to be changed and never need to be applied anywhere else. Even then it is better practice to only put HTML in your HTML page and keep the CSS and Javascript in their own files.