Drop Down Lists

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created a drop down list that has some selections within the list to
be over 20 characters per line. Without increasing the 'position' size of
the field how can I get the list items to display completely? I would like
the visitor to be able to click on the drop down arrow; when the list
displays and they drag their mouse over a selection I want it to expand over
the top of the field so they can read the entire description - does that make
sense?
 
A dropdown list in a web page will always be wide enough to display the
widest item unless you have set a width for the <select> tag. Remove
the width setting.

Otherwise, add a title attribute to each <option>
Example:
<form method="post" action="">
<select name="Select1" style="width:50px;">
<option title="Madagascar">Madagascar</option>
</select>
</form>
 
I must not have explained myself well enough. By removing the width as you
suggested from the <select> tag causes my web page to get out of whack!
(technical term!) I have columns on my page - I probably should have said
that in the beginning. I want the visitor to be able to drag their mouse
over the drop down list and when positioned on a list item the item will come
to the top of the page and the entire list item is visible.
 
Not supported by the drop down menu form element.

--
==============================================
Thomas A. Rowe
Microsoft MVP - FrontPage

http://www.Ecom-Data.com
==============================================
 
The best you can do is my solution with the title attribute. Hover
event on a drop down list <option> is not available in IE6 and earlier,
so you must use the click event to get anywhere near what you require.
What do you mean by: " the item will come to the top of the page"? Do
you literally mean writing the select object at the top of the page?
No-one would think to look there. You can copy the selected object
using JavaScript and the onclick event to elsewhere on the page, but the
title attribute will be better since the resulting tooltip appears where
the user expects it to appear, and it works when hovering - clicking
also makes the selection and clicking the down arrow then click the
option to see what it is then repeat..... annoying, at least.
--
Ron Symonds - Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.
FrontPage Support: http://www.frontpagemvps.com/
http://www.rxs-enterprises.org/fp
 
Back
Top