...

View Full Version : Formatting a Combo Box



RebelAngel
04-14-2005, 06:26 AM
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.

glenngv
04-14-2005, 10:11 AM
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.


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

RebelAngel
04-14-2005, 07:44 PM
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 ...

glenngv
04-15-2005, 02:56 AM
Can you post your code? It seems that you removed the JavaScript Kit combobox in your site.

RebelAngel
04-17-2005, 12:26 PM
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 ...

<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>

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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum