iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-15-2005, 11:18 AM
Bohak's Avatar
WebProWorld Pro
 
Join Date: May 2004
Location: FL
Posts: 116
Bohak RepRank 0
Default Bold text in a drop down menu for a form

I built an order form with drop down menus for visitors to select products from, and would like to make the specials in the drop down bold

Is this possible?
__________________
BohakGraphics.com
Reply With Quote
  #2 (permalink)  
Old 04-15-2005, 03:11 PM
ADAM Web Design's Avatar
WebProWorld 1,000+ Club
 
Join Date: Dec 2003
Location: Toronto, Ontario, Canada
Posts: 2,181
ADAM Web Design RepRank 1
Default

It is, using CSS. Put the following in your style sheet:
Code:
.special {
   font-weight:  bold;
}
Then, for each special you have, do the following:
Code:
<option class="special">Special Sale</option>
And you should be good to go from there.
Reply With Quote
  #3 (permalink)  
Old 04-15-2005, 04:20 PM
Bohak's Avatar
WebProWorld Pro
 
Join Date: May 2004
Location: FL
Posts: 116
Bohak RepRank 0
Default close but....

I tried that and it didnt seem to work. So I highlighted the text of the specials and selected "special" in my CSS panel and it "bolded" all the products in the entire drop down.

I only want the specials to be bold.

Thanks for tryin.


<select name="Product" id="select4">
<option value="(click here to select the quantity)">(click here to select the quantity)</option>
<option value="$39.95 Weight Loss Supplements (1 bottle = 60 capsules) ">Weight Loss Supplements (1 bottle = 60 capsules) $39.95</option>
<option value="$44.95 Weight Loss Supplements (2 bottles = 120 capsules) ">Weight Loss Supplements (2 bottles = 120 capsules) $44.95</option>
<option value="$64.90 Weight Loss Supplements (3 bottles = 180 capsules) ">Weight Loss Supplements (3 bottles = 180 capsules) $64.90</option>
<option value="$49.90 Weight Loss Supplements SPECIAL OFFER (2 bottles of Weight Loss Supplements + 1 free bottle of HGH capsules) ">Weight Loss Supplements SPECIAL OFFER (2 bottles of Weight Loss Supplements + 1 free bottle of HGH capsules) $49.90</option>
<option value="$44.95 Weight Loss Supplements SPECIAL OFFER (Buy 2 get one free) "class="special">Weight Loss Supplements SPECIAL OFFER (Buy 2 get one free) $44.95</option>
</select>
__________________
BohakGraphics.com
Reply With Quote
  #4 (permalink)  
Old 04-15-2005, 05:45 PM
ADAM Web Design's Avatar
WebProWorld 1,000+ Club
 
Join Date: Dec 2003
Location: Toronto, Ontario, Canada
Posts: 2,181
ADAM Web Design RepRank 1
Default

Well I'll be damned. I just assumed it would work since foreground/background colours do. Evidently, they never included that an option.

But I did come up with an alternative that may work for you:

http://www.adamwebdesign.ca/demos/option_css.html

It's not bold per se, but at least it stands out. (Adjust the colours accordingly.)
Reply With Quote
  #5 (permalink)  
Old 04-15-2005, 07:15 PM
paulhiles's Avatar
WebProWorld 1,000+ Club
 
Join Date: Jul 2003
Location: UK
Posts: 2,089
paulhiles RepRank 0
Default Styling forms with CSS

There's a promising looking tutorial here "Styling Dropdown Lists"

See the second example on the page.

Hope that helps!

Paul
Reply With Quote
  #6 (permalink)  
Old 04-15-2005, 11:00 PM
ADAM Web Design's Avatar
WebProWorld 1,000+ Club
 
Join Date: Dec 2003
Location: Toronto, Ontario, Canada
Posts: 2,181
ADAM Web Design RepRank 1
Default

heh :) Hey Paul, did you look at the result dropdown for that tut vs. the one in my demo? They look kind of similar. :)

The tut's probably the better link though. It explains things in a little more detail.

FYI to Bohak: the tut won't tell you this, and I didn't per se in my demo, but you can't control font styles within option tags; you can only do so within the select tag itself (this is something I figured out by trying all the ones I knew about.)

The only thing you can do is control the background/foreground effects.
Reply With Quote
  #7 (permalink)  
Old 04-18-2005, 03:35 PM
Bohak's Avatar
WebProWorld Pro
 
Join Date: May 2004
Location: FL
Posts: 116
Bohak RepRank 0
Default

Thanks Adam,
Thanks Paul,

I read and used both tutorials and it worked well. I am surprised that there is not a way to bold individual text within a drop down, could have sworn I saw it somewhere.
__________________
BohakGraphics.com
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 05:30 AM.



Search Engine Optimization by vBSEO 3.3.0