Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. HTML Select DropDown Width

HTML Select DropDown Width

Scheduled Pinned Locked Moved Web Development
questionhtmlhelp
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Ahmet GULBAY
    wrote on last edited by
    #1

    Hi everyone, I've a problem with dropdown lists. The standart select/option's dropdown list is resized to the select's width, like whether the option is longer than select's width [Select v] [option 1] [option 2] ... I want the select's option list is resized longer widths, like [select v] [option 1 xxxxxxxx] [option 2 yyyyyyyy] ... How can i do this? Thanks.

    S R 2 Replies Last reply
    0
    • A Ahmet GULBAY

      Hi everyone, I've a problem with dropdown lists. The standart select/option's dropdown list is resized to the select's width, like whether the option is longer than select's width [Select v] [option 1] [option 2] ... I want the select's option list is resized longer widths, like [select v] [option 1 xxxxxxxx] [option 2 yyyyyyyy] ... How can i do this? Thanks.

      S Offline
      S Offline
      Shog9 0
      wrote on last edited by
      #2

      Good browsers will automatically resize the drop-down to fit the options displayed in it. For the unfortunate users of lesser browsers, you might try a hack like this: http://www.hedgerwow.com/360/dhtml/ui_select_with_fixed_width/demo.php[^] Or just abandon drop-down select elements, and go with a list (set size to > 1).

      Citizen 20.1.01

      'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'

      A 1 Reply Last reply
      0
      • A Ahmet GULBAY

        Hi everyone, I've a problem with dropdown lists. The standart select/option's dropdown list is resized to the select's width, like whether the option is longer than select's width [Select v] [option 1] [option 2] ... I want the select's option list is resized longer widths, like [select v] [option 1 xxxxxxxx] [option 2 yyyyyyyy] ... How can i do this? Thanks.

        R Offline
        R Offline
        Rao Rafique
        wrote on last edited by
        #3

        U have to set its width attribute using CSS... in the dreamweaver u can write code like this...I have set it to 200 pixkels, u may set it to any suitable value....Plz follow the code... optionvalue T :laugh: hanks

        "Programming is a fun"

        S 1 Reply Last reply
        0
        • R Rao Rafique

          U have to set its width attribute using CSS... in the dreamweaver u can write code like this...I have set it to 200 pixkels, u may set it to any suitable value....Plz follow the code... optionvalue T :laugh: hanks

          "Programming is a fun"

          S Offline
          S Offline
          Shog9 0
          wrote on last edited by
          #4

          In IE, this will also constrain the width of the dropdown (cutting off options longer than 200px in your example).

          Citizen 20.1.01

          'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'

          1 Reply Last reply
          0
          • S Shog9 0

            Good browsers will automatically resize the drop-down to fit the options displayed in it. For the unfortunate users of lesser browsers, you might try a hack like this: http://www.hedgerwow.com/360/dhtml/ui_select_with_fixed_width/demo.php[^] Or just abandon drop-down select elements, and go with a list (set size to > 1).

            Citizen 20.1.01

            'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'

            A Offline
            A Offline
            Ahmet GULBAY
            wrote on last edited by
            #5

            Thank you for the script (;

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups