Results 1 to 5 of 5

Thread: problem with using <select> and <option>

  1. #1
    Senior Member kasavien's Avatar
    Join Date
    Aug 2005
    Location
    St. Albans
    Posts
    1,829
    Thanks
    145
    Thanked
    104 times in 49 posts

    problem with using <select> and <option>

    Hi was wondering if someonecould help with an issue i have on a website i'm creating. when i use select and option to create a drop down list, it creates the list fine and all the options are there but, the longest option is slightly osbscured so you can't see the end of the word. This only occurs in firefox, in explorer the lists are rendered correctly.

    Is there any way to fix this other than specifically defining the length of the list box?

    Thanks

    Andy

  2. #2
    Comfortably Numb directhex's Avatar
    Join Date
    Jul 2003
    Location
    /dev/urandom
    Posts
    17,074
    Thanks
    228
    Thanked
    1,027 times in 678 posts
    • directhex's system
      • Motherboard:
      • Asus ROG Strix B550-I Gaming
      • CPU:
      • Ryzen 5900x
      • Memory:
      • 64GB G.Skill Trident Z RGB
      • Storage:
      • 2TB Seagate Firecuda 520
      • Graphics card(s):
      • EVGA GeForce RTX 3080 XC3 Ultra
      • PSU:
      • EVGA SuperNOVA 850W G3
      • Case:
      • NZXT H210i
      • Operating System:
      • Ubuntu 20.04, Windows 10
      • Monitor(s):
      • LG 34GN850
      • Internet:
      • FIOS

    Re: problem with using <select> and <option>

    if you don't explicitly define it, how wide exactly do you want the box to be?

  3. #3
    Senior Member kasavien's Avatar
    Join Date
    Aug 2005
    Location
    St. Albans
    Posts
    1,829
    Thanks
    145
    Thanked
    104 times in 49 posts

    Re: problem with using <select> and <option>

    I like the drop down box to be as wide as the longest option it gives, at the moment it displays as slightly shorter than the longest option and this cuts the end of the word off. I can for the life of me see why though

  4. #4
    Funking Prink! Raz316's Avatar
    Join Date
    Jul 2003
    Location
    Deal, Kent, UK
    Posts
    2,978
    Thanks
    130
    Thanked
    62 times in 52 posts

    Re: problem with using <select> and <option>

    Code:
    <style>
    	select{
    		padding: 0px 0px 0px 10px;
    		font-family: verdana;
    	}
    </style>
    
    <select>
    <option value="weee">Weeeeeee asawe awe</option>
    <option value="weee">Weeeeeee asawe awe</option>
    <option value="weee">Weeeeeee asawe awe</option>
    <option value="weee">Weeeeeee asawe awe</option>
    <option value="weee">Weeeeeee asawe awe</option>
    <option value="weee">Weeeeeee asawe awe</option>
    </select>
    Are you styling the font for the select? The above example adds some right side padding.

  5. Received thanks from:

    kasavien (01-12-2007)

  6. #5
    Senior Member kasavien's Avatar
    Join Date
    Aug 2005
    Location
    St. Albans
    Posts
    1,829
    Thanks
    145
    Thanked
    104 times in 49 posts

    Re: problem with using <select> and <option>

    thanks, i'll try that, don't think there's any padding in the style sheet i'm using

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •