Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Apr 2005
    Location
    Ohio
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Formatting a Combo Box

    Hello, I've researched everywhere I can think of but to no avail. I have two simple menu boxes on my website (http://rebelangel64.blogspot.com). I've added a JavaScript Kit combo box. Now, I would like to format the new combo box like the other two.

    Where should I add the formatting for the combo box and what is the proper syntax?

    Here is the script for one of the two simple menu boxes:


    <p align="right">
    <select name="archivemenu" style="width:250;background-color:#8CB5EF;color:#000080;font-size:10px;font-family:Verdana,Arial,Helvetica,sans-serif;"

    onchange="document.location.href=this.options[this.selectedIndex].value;">
    <option selected> - the catacombs - </option>


    Here is the combo box script:

    <form name="dynamiccombo">
    <select name="stage2" size="1" onChange="displaysub()">
    <option value="#">This is a place Holder text </option>
    <option value="#">This is a Place Holder text </option>
    <option value="#">This is a Place Holder text </option>
    <option value="#">This is a Place Holder text </option>
    </select>
    <input type="button" name="test" value="Go!"
    onClick="gothere()">
    </form>

    <script>
    <!--

    //2-level combo box script- by javascriptkit.com
    //Visit JavaScript Kit (http://javascriptkit.com) for script
    //Credit must stay intact for use

    //STEP 1 of 2: DEFINE the main category links below
    //EXTEND array as needed following the laid out structure
    //BE sure to preserve the first line, as it's used to display main title
    var category=new Array()
    category[0]=new Option("- select a category -", "") //THIS LINE RESERVED TO CONTAIN COMBO TITLE


    I'm not sure I've copied enough for your review. If you need more, please let me know.

    Any assistance you can provide would be most appreciated.

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,042
    Thanks
    0
    Thanked 251 Times in 247 Posts
    Just copy the style attribute from archivemenu combo to dynamiccombo.

    style="width:250;background-color:#8CB5EF;color:#000080;font-size:10px;font-family:Verdana,Arial,Helvetica,sans-serif;"

    Or simply add this CSS rule to your <style> tag and all your select tags will use that format even without that style attribute.

    Code:
    select {
      width:250;
      background-color:#8CB5EF;
      color:#000080;
      font-size:10px;
      font-family:Verdana,Arial,Helvetica,sans-serif;
    }

  • #3
    New to the CF scene
    Join Date
    Apr 2005
    Location
    Ohio
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Glenn:

    I tried doing both, adding a CSS element and changing the style attribute and neither worked ... i'm going to have to do some more debugging or change the type of menu box ...

    anyway, thanks for your assistance ...

  • #4
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,042
    Thanks
    0
    Thanked 251 Times in 247 Posts
    Can you post your code? It seems that you removed the JavaScript Kit combobox in your site.

  • #5
    New to the CF scene
    Join Date
    Apr 2005
    Location
    Ohio
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by glenngv
    Can you post your code? It seems that you removed the JavaScript Kit combobox in your site.
    unfortunately, i didn't save the combobox when i opted to use the folding menu tree ... HOWEVER, i need a tiny bit of help here too ...

    i'm able to align the plus sign in the middle of the text but i can't figure out how to do it with the minus sign ...

    [FONT=Courier New]<div class="look"><img src="http://users.adelphia.net/~staryjo/blog/fold.gif" align="middle" class="folding"> <a href="dfddf">just for fun</a>
    <ul class="look2" style="list-style-image:url(http://users.adelphia.net/~staryjo/blog/list.gif);display:none">
    <li>&nbsp;&nbsp;<a href="http://www.barcodeart.com/art/yourself/yourself.html" target="_blank">barcode yourself</a></li>
    <li>&nbsp;&nbsp;<a href="http://www.blogstickers.com/" target="_blank">blogstickers</a></li>[/FONT
    ]

    i'm sure this is something really simple ... glenn, thank you so much for sticking with me on this ...


  •  

    Posting Permissions

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