Any simple way to add a scrolling action to a drop-down list?

Any simple way to add a scrolling action (side scroll bar) to a drop-down list?
Here’s the Form code:

<li style="width:240px; text-align:right"><strong>Optional:&nbsp;</strong></li>
<li style="width:450px; text-align:left;" ><select class="upload-video-form-input" id="sub_change" style="width:160px;" size="1" name="sub_cat"></select>
</li>

Any help will be appreciated.

It seems a little brief - should there be something else here?

Yes, hah…here’s more:


<form enctype="multipart/form-data" action="uploader.php" method="POST">
		              	<div id="upload-video">
		                <ul>
		                <li style="width:240px; text-align:right;"><strong>[var.lang_title]:</strong></li>
		                <li style="width:400px; text-align:left;"><input name="title" type="text" class="upload-video-form-input" value="[var.title]" size="38" />
		                </li>

                		<li style="width:240px; text-align:right;"><strong>[var.lang_description]:</strong><br /></li>
                		<li style="width:400px; text-align:left;"><textarea rows="4" name="description" id="description" cols="29" class="upload-video-form-input">[var.description]</textarea><br />
                 		</li>

		                <li style="width:240px; text-align:right;"><strong>[var.lang_tags]:</strong></li>
		                <li style="width:400px; text-align:left;"><input name="tags" type="text" class="upload-video-form-input" value="[var.tags]" size="38" />
		                </li>

				<input type="hidden" name="channel" value="1"/>
				<li style="width:240px; text-align:right"><strong>Optional:&nbsp;</strong></li>
				<li style="width:450px; text-align:left;" ><select class="upload-video-form-input" id="sub_change" style="width:160px;" size="1" name="sub_cat"></select>
				</li>

		                <input type="hidden" name="vid_upload_token" value="[var.vid_upload_token]" />
		
		         	<table id="tabZ">
				<tbody>
				<tr>
				<td>
           	    		<input type="submit" value="Submit">	
           	    		</li>
           	    		</td></tr>
				</tbody>
				</table>
				</ul>
                		<input class="upload-video-form-input" type="hidden" name="form_submitted" value="yes" />
				</table>
          			</form>
 				<script>javascript:ahahscript.ahah('[var.base_url]/uploader.php?sub_cat=1', 'sub_change', '', 'GET', '', this); </script>

Hi there ChrisjChrisj,

it looks like the the person who coded that excuse
for a form, had over indulged the “waccy baccy”. :mask:

Has the rest of the document been coded in a similar vein?

coothead

3 Likes

From looking at that mark-up there are more problems than trying to add scrolling.

The HTML is not well-formed, let alone valid.

TBH I’d be surprised if it would even render halfway decently.

I’m also surprised no other member has mentioned this to you before

Validate your HTML !

2 Likes

There are not any reliable ways to style the select element with css. There are some hacky ways to do it, but they won’t appear the same across all browsers.

Already some discussion on it here at SO:

Vertical scroll in Select html

<select> element CSS3 styling solution

I suspect that invalid markup is the cause of the OP’s other problems as well. Hard to say for sure when they don’t reply back or show the entire code.

The OP’s time would be best spent learning to write valid html first. Then they would see the css problems decline.

2 Likes

Losing the in-line styling would probably help with that too.

2 Likes

Thanks for your replies

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.