Results 1 to 15 of 15
  1. #1
    ABW Ambassador HumbleFish's Avatar
    Join Date
    January 18th, 2005
    Location
    Arizona
    Posts
    680
    Way to change Drop Down Menu Window width?
    Hi All,

    Is there to change the Drop Down Menu Window width?... I would like to have the window in the code below to be only 120 pixels wide... Is that possible?

    <form name="form1">
    <select style="font-size:12px;color:#006699;font-family:verdana;background-color:#ffffff;" name="menu">
    <option value="http://www.humblefishmall.com/hum1a.html">Antique & Auction Store</option>
    <option value="http://www.humblefishmall.com/hum2a.html">Appliance Store</option>
    <option value="http://www.humblefishmall.com/hum3a.html">Art Store</option>
    <option value="http://www.humblefishmall.com/hum4a.html">Baby Store</option>
    <option value="http://www.humblefishmall.com/hum5a.html">Baby Store</option>
    <option value="http://www.humblefishmall.com/hum6a.html">Baby Store</option>
    <option value="http://www.humblefishmall.com/hum7a.html">Baby Store</option>
    <option value="http://www.humblefishmall.com/hum8a.html">Baby Store</option>
    <option value="http://www.humblefishmall.com/hum8a.html">Baby Store</option>
    <option value="http://www.humblefishmall.com/hum8a.html">Baby Store</option>
    </select>
    <input style="font-size:12px;color:#ffffff;font-family:verdana;background-color:#006699;" type="button" onClick="location=document.form1.menu.options[document.form1.menu.selectedIndex].value;" value="Go">
    </form>

  2. #2
    Member iktorn's Avatar
    Join Date
    January 18th, 2005
    Location
    Poland
    Posts
    108
    You would have to change the font size - the min width is the width of an widest option.

  3. #3
    Full Member Deb's Avatar
    Join Date
    January 19th, 2005
    Location
    Missouri
    Posts
    185
    I'm not sure how to make it a "fixed" width. The way you have it now is that it will be as wide as your longest text. It will automatically resize according to the length of your text. You could shorten your text (drop the word "store" off) or make the text a smaller font (10pt or 8pt). That would shorten the window.

    I'm not a programmer or techie, but maybe this much will help for now.

  4. #4
    ABW Ambassador HumbleFish's Avatar
    Join Date
    January 18th, 2005
    Location
    Arizona
    Posts
    680
    Hi iktorn,

    Are You saying that the width is controlled by the number of letters in the availiable selections... Like if I have only have "baby" in the menu the window will only be 4 letters wide?

    And if so, is there not any other way to adjust it? or is there a different type of "free" drop down menu I could use?

    Thanks for Your help and Love You,
    HumbleFish

  5. #5
    ABW Ambassador HumbleFish's Avatar
    Join Date
    January 18th, 2005
    Location
    Arizona
    Posts
    680
    Hi Deb,

    That's what I'm looking for: away to make it as You say "fixed width"...

    Anyone have the magic bullet? or another menu that will stay a constant 120 pixels until opened?

    Thanks for Your help and Love You,
    HumbleFish

  6. #6
    Member iktorn's Avatar
    Join Date
    January 18th, 2005
    Location
    Poland
    Posts
    108
    Check this out:
    http://www.htmlcodetutorial.com/help...statement.html
    But the problem is the longer items get cut in IE (Firefox is OK)
    More info also here:
    http://www.blooberry.com/indexdot/ht...electwidth.htm

  7. #7
    Full Member Deb's Avatar
    Join Date
    January 19th, 2005
    Location
    Missouri
    Posts
    185
    If you do find a way to make it a "fixed width," then you would have to be careful because some of your longer text will be cut off on the right side. I would think that would be less appealing than to have the font smaller or the words abbreviated.

  8. #8
    Full Member Deb's Avatar
    Join Date
    January 19th, 2005
    Location
    Missouri
    Posts
    185
    iktorn - you're just a little too fast for me on the posts. At least we are in agreement!

  9. #9
    Member iktorn's Avatar
    Join Date
    January 18th, 2005
    Location
    Poland
    Posts
    108
    Deb: I'm trying harder

  10. #10
    ABW Ambassador HumbleFish's Avatar
    Join Date
    January 18th, 2005
    Location
    Arizona
    Posts
    680
    Thanks Deb,

    iktorn, You the Man... I tip my hat to You What You gave me works great, but I wonder if You and Deb could check my work to see if I did it right... Here's what I have now:

    <form name="form1">
    <select style="font-size:12px;color:#006699;font-family:verdana;background-color:#ffffff;width:91px;" name="menu">
    <option value="http://www.humblefishmall.com/hum1a.html">Antique & Auction Store</option>
    <option value="http://www.humblefishmall.com/hum2a.html">Appliance Store</option>
    <option value="http://www.humblefishmall.com/hum3a.html">Art Store</option>
    <option value="http://www.humblefishmall.com/hum4a.html">Baby Store</option>
    <option value="http://www.humblefishmall.com/hum5a.html">Baby Store</option>
    <option value="http://www.humblefishmall.com/hum6a.html">Baby Store</option>
    <option value="http://www.humblefishmall.com/hum7a.html">Baby Store</option>
    <option value="http://www.humblefishmall.com/hum8a.html">Baby Store</option>
    <option value="http://www.humblefishmall.com/hum8a.html">Baby Store</option>
    <option value="http://www.humblefishmall.com/hum8a.html">Baby Store</option>
    </select>
    <input style="font-size:11px;color:#ffffff;font-family:verdana;background-color:#006699;" type="button" onClick="location=document.form1.menu.options[document.form1.menu.selectedIndex].value;" value="Go">
    </form>

    As You can see, the "width:91px;" variable is in the second line from the top (see above) and this way comes out pretty close to my desired 120 pixels... Did I do it right (I know very little about css)?... If I didn't do it right please tell me how to fix it.

    Thanks and Love You,
    HumbleFish

  11. #11
    Full Member Deb's Avatar
    Join Date
    January 19th, 2005
    Location
    Missouri
    Posts
    185
    Looks like you got it figured out. Seems to work great - the link took me to the right page.

    But still, in IE, your words are cut off. You will want people to see where they are going. All they will see is the "Antique" part. They may not realize there is an auction, too. If "Auction" is what they are looking for, they may inadvertently miss it.

  12. #12
    Member iktorn's Avatar
    Join Date
    January 18th, 2005
    Location
    Poland
    Posts
    108
    Deb: I agree
    Victor
    [url=http://dir.seo7.net]FREE Website Directory[/url] <- add your link NOW!
    [url=http://seo7.net/buy]Buy links[/url] <- cheap

  13. #13
    Full Member Deb's Avatar
    Join Date
    January 19th, 2005
    Location
    Missouri
    Posts
    185
    iktorn,

    At least I beat you to the post this time!

  14. #14
    ABW Ambassador HumbleFish's Avatar
    Join Date
    January 18th, 2005
    Location
    Arizona
    Posts
    680
    Thanks Deb, and iktorn,

    Yes I know it's cuts off some of the words; but it'll be better than they have right now (I may figure out a better place for it latter)... Plus they have the homepage and the sitemap to fall back on... To bad it doesn't open up and reveal all the words when You click on it; I have seen some that do that but I guess I'll have to wait for that to show up?... If anyone knows of one that will do that please PM me.

    I sure thank You though... Couldn't have done it without You... Atleast not as fast.

    Love You,
    HumbleFish

  15. #15
    ABW Ambassador DesignerWiz's Avatar
    Join Date
    January 18th, 2005
    Location
    U.S.A
    Posts
    2,777
    You can get better results using .CSS .... but here's a quicky fix.

    <select name="NAME-HERE" style="width:120px">

    - sorry .... for some reason when I loaded the page I did not see the other responses because they did not load ... after answering your question the other replies appeared.
    Ray Thomas
    Webmaster Resources: http://DesignerWiz.com
    ABW Board Category: Programming / Coding
    http://forum.abestweb.com/forumdisplay.php?f=190

  16. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Good Plugin For Drop Down Menu?
    By Trust in forum Blogging, Mobile and Social Media
    Replies: 6
    Last Post: October 12th, 2009, 04:23 PM
  2. WordPress - Drop down menu
    By hipgirlie in forum Programming / Datafeeds / Tools
    Replies: 1
    Last Post: May 18th, 2008, 07:59 PM
  3. I need help with a php drop down menu
    By tsmgroup2 in forum Programming / Datafeeds / Tools
    Replies: 1
    Last Post: June 26th, 2007, 01:18 AM
  4. Another drop down menu question
    By SSanf in forum Programming / Datafeeds / Tools
    Replies: 5
    Last Post: January 14th, 2003, 03:07 AM

Posting Permissions

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