Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Internet & the Web (https://www.askmehelpdesk.com/forumdisplay.php?f=177)
-   -   Form element (list) problem. (https://www.askmehelpdesk.com/showthread.php?t=15781)

  • Dec 6, 2005, 10:30 AM
    RickJ
    Form element (list) problem.
    I'm using

    Code:

    style="width:200px"
    in the select tag to control the width of list boxes, but I'm missing the horizontal scroll bar:

    See the Construction list at http://ohiobusinesslist.com/query2.html

    How can I get a horizontal scroll bar for the lists that have items in them that are wider than the listbox?

    Thanks!
  • Dec 7, 2005, 02:01 AM
    LTheobald
    I don't think it's possible with plain HTML/CSS Rick. It should be possible with some JavaScript and a little DHTML but it's probably not worth it.

    It'll probably just be best to shrink the font size of the select boxes a little.
  • Dec 7, 2005, 02:59 AM
    RickJ
    Thanks Lee. Yes, after trying a variety of things that just don't cut the mustard, including a tooltip for long ones (which looks cheezy), I'll just take the font down, and go through all of them looking for any long names - and shorten them.
  • Dec 7, 2005, 04:20 AM
    RickJ
    Aargh!

    Figured changing the font size would be easy, but I'm not seeing how to do it.

    Here's a sample of the code of one of the lists:

    Code:

    <select name="health" size="5" multiple id="select5" style="width:205px">
                                    <option>Veterinary
                                    <option>Hospital
                                    <option>Nursing Home
                                    <option>Physicians
                                    <option>Retirement Center
                                    <option>Retirement Living
                                    <option>Retirement Center Food Svc.
                                  </select>

    I'm using DW... and am guessing that the font size is a default. Can I insert some code to designate the size of the font of the items in the list?

    Thank you!
  • Dec 7, 2005, 04:52 AM
    LTheobald
    Yep, that's no problem. Just add font-width to your style attribute on your select tag. E.g:

    Code:

    <select name="health" size="5" multiple id="select5" style="width:205px; font-size: 8pt;">
  • Dec 7, 2005, 04:56 AM
    RickJ
    You deserve double Approval for bearing with me, such a newbie!

    Thanks Lee! http://www.jackson8.com/images/amhd/thumb.gif
  • Dec 7, 2005, 05:06 AM
    RickJ
    Double dog-gonnit!

    Check out these 3 lists: http://www.ohiobusinesslist.com/testlist.html

    I've got the first designated as size 4, 2nd one 6 and 3rd one 8... yet they all look the same in IE.

    Any suggestions?

    How much do I owe you? :o

    PS Edit: Note: they look the same as they did without the font-size designations.
  • Dec 7, 2005, 05:45 AM
    RickJ
    I figured it out.

    I was missing the ; after the width.

  • All times are GMT -7. The time now is 07:18 AM.