Results 1 to 5 of 5

Thread: Select option drop down

  1. #1
    Join Date
    Jan 2006
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Red face Select option drop down

    I am trying to do 2 things and getting nowhere. Any advice would be appreciated.

    1- I have numerous texts to be inserted into a Select drop down option menu for links. However it is extremely long and will not wrap. I have tried everything i know to wrap it but it is cut off. I dont want the page scrolling to the right.

    2- Changing the color of the menu , ie not just the background color. I want the arrow and all of it a different style.

    Please help

    Kase

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    1- I have numerous texts to be inserted into a Select drop down option menu for links. However it is extremely long and will not wrap. I have tried everything i know to wrap it but it is cut off. I dont want the page scrolling to the right.
    Then use shorter text. <option> elements will not wrap.
    2- Changing the color of the menu , ie not just the background color. I want the arrow and all of it a different style.
    You can try using the CSS:
    Code:
    select {
      color: red;
      background-color: black;
    }
    However, that's far from reliable, since form elements tend to be handled by the underlying toolkit, and so cannot be affected by your code. It may work in a few browsers.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Jan 2006
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default No

    I was hoping for a more Javascript based answer. I cannot reduce the size of the text because of its content and i already know the HTML commands you gave me , looking for a script that allows the drop down box to be changed in appearance while at the same time allowing wrapping of text.

    Kase

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I cannot reduce the size of the text because of its content and i already know the HTML commands you gave me , looking for a script that allows the drop down box to be changed in appearance while at the same time allowing wrapping of text.
    I repeat: <option> elements will not wrap. Why would you want a Javascript-based solution if the only thing approaching a solution that is possible is available in the far-more-widely-used CSS? A better idea is to avoid Javascript wherever possible. I gave no HTML, by the bye.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,375
    Thanks
    77
    Thanked 3,421 Times in 3,382 Posts
    Blog Entries
    12

    Default

    Can't be done using the select and option elements. You could construct script and/or markup (using divisions, spans, etc.) to present your content in the manner you desire but, the select and option elements do not have the flexibility you seem to require.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

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