SitePoint Sponsor

User Tag List

Results 1 to 12 of 12
  1. #1
    ********* Addict WP1's Avatar
    Join Date
    Aug 2000
    Location
    New York , USA
    Posts
    407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello SitePoint Community,

    Is there a way to decrease the width of a "pull down" menu. I have seen some "pull down" menus as narrow as 100px with small text. I tried to decrease the text size of the script I am working on but I was unsucessful.

    There is a lot of stuff on the web about "pull down" menus BUT I could not find anything about decreasing the width or text size of the options.

    I hope someone here can help me out. I placed the menu on the following page,
    http://testingdonehere.homestead.com...translator.htm

    I am going to adjust the overall code so the panal fits in a 150px width column.

    All suggestions appreciated. Also, if anyone has any links to sites which address this issue I would appreciate them.

    WP
    Webbing Along!!!

  2. #2
    SitePoint Guru Vincent Puglia's Avatar
    Join Date
    Feb 2000
    Location
    where the World once stood
    Posts
    700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi WP,

    In IE-compatible browsers, you can use the inline style attribute:
    <select style="width:20">
    <option >some really long text line that never ends.....</option>
    </select>

    But, it won't work for netscape ver 4s & below nor anyone else since NN draws the box to fit the longest option. The only real crossBrowser solution is to shorten the option's text.

    Vinny
    Where the World Once Stood
    the blades of grass
    cut me still

  3. #3
    SitePoint Wizard TWTCommish's Avatar
    Join Date
    Aug 1999
    Location
    Pittsburgh, PA, USA
    Posts
    3,910
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, it stretches to fit all text...so smaller text would be the way...

    Try this:

    Code:
    <b>Stuff:</b><br>
    <select name="stuff" style="font-size: 9px" size="1">
    <option selected value="1">Number One</option>
    <option value="2">Number Two</option>
    <option value="3">Number Three</option>
    </select>
    If that's too small, change "9px" to "10px", or higher...etc. Hope this helps! Please keep in mind that this won't be supported on all browsers. I think only later versions of IE...

  4. #4
    SitePoint Wizard TWTCommish's Avatar
    Join Date
    Aug 1999
    Location
    Pittsburgh, PA, USA
    Posts
    3,910
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Argh! One minute after his post! D'oh...

  5. #5
    SitePoint Guru Vincent Puglia's Avatar
    Join Date
    Feb 2000
    Location
    where the World once stood
    Posts
    700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Chris,

    Sorry about that.

    vinny
    Where the World Once Stood
    the blades of grass
    cut me still

  6. #6
    SitePoint Wizard TWTCommish's Avatar
    Join Date
    Aug 1999
    Location
    Pittsburgh, PA, USA
    Posts
    3,910
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No problem - my fault for taking so long.

    Any luck WP1? Did it help?

  7. #7
    ********* Addict WP1's Avatar
    Join Date
    Aug 2000
    Location
    New York , USA
    Posts
    407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello TWTCommish and Vincent Puglia,

    Thank you for your suggestions. I decided to remove some text from the "Options". I changed English to Eng. I think the folks looking at my page will know how to interpret that.

    Got it to look "OK" in IE (5.5) and Netscape (4.75).

    You can see what I did and compare it to the original code, if you want to, at,
    http://members.nbci.com/questions_to..._Test_Page.htm

    I wish Netscape would get it together. I think it may be heading the way of the dinosaur. I really like Netscape. I learned about the Internet via Netscape but making pages that work with it is frustrating.

    Thanks again folks,

    WP
    Webbing Along!!!

  8. #8
    SitePoint Guru Vincent Puglia's Avatar
    Join Date
    Feb 2000
    Location
    where the World once stood
    Posts
    700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi WP,

    Well it is prettier And yes, people should get the idea. One comment, though: you should close your option tags; some browsers aren't going to like the absence of closing tags.

    If you have any more questions on html or javascript, feel free to post them in the Client-Side section -- that way others can also benefit without having to jump all over the site.

    Vinny
    Where the World Once Stood
    the blades of grass
    cut me still

  9. #9
    ********* Addict WP1's Avatar
    Join Date
    Aug 2000
    Location
    New York , USA
    Posts
    407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Vincent Puglia
    Hi WP,

    Well it is prettier And yes, people should get the idea. One comment, though: you should close your option tags; some browsers aren't going to like the absence of closing tags.

    SNIP...

    Hi Vincent Puglia,

    Thanks for following up with me. I will take your advice and close the option tags. Also, will post a bit more in the "Client-Side" section. I guess being a Newbie, I just gravitate to the "Beginners" section most of the time.

    WP


    Webbing Along!!!

  10. #10
    SitePoint Guru Vincent Puglia's Avatar
    Join Date
    Feb 2000
    Location
    where the World once stood
    Posts
    700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi WP,

    Glad to have been of help.
    And except for the people who started the web way back when, we are all newbies. I, for one, still have a lot to learn, which is why I moderate. By teaching others, I learn.

    later gater
    Vinny
    Where the World Once Stood
    the blades of grass
    cut me still

  11. #11
    SitePoint Enthusiast
    Join Date
    Sep 2000
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok in IE 3,4 Netscape 3,4 good work!
    Craig D. Parker
    http://www.fantasystats.com
    Free Fantasy Football Leagues

  12. #12
    ********* Addict WP1's Avatar
    Join Date
    Aug 2000
    Location
    New York , USA
    Posts
    407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by stat_man
    Ok in IE 3,4 Netscape 3,4 good work!
    Thank you,

    WP
    Webbing Along!!!


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
  •