473,399 Members | 4,254 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Mac & IE: background color for select elements (or the options within) using CSS/Style

I'm trying to make a select box where each of 3 elements shows up as a
different color. I've gotten it working on the PC, but seem to be
having some troubles with the Mac/IE combo.

Apparently Mac users don't see the background color(s) when they
open the select box tab.

I've tried a couple different ways, but haven't managed to make it
work (though I believe on Mac/Netscape it works). Some code below...I
tried both using classes and setting the style directly on the option
elements.

If someone can show/explain how to make a mac/IE (5.2) combo show
background color(s), or point me at a site wher it works that'd be
great.

Thanks a lot,
-James
================================================== =============
<style type="text/css">
..selectStyleNeutral {
background-color: white;
}
..selectStyleRed {
background-color: red;
}
..selectStyleBlue {
background-color: Blue;
}
</style>
<select name="foo2">
<option value="" class="selectStyleNeutral">&nbsp;</option>
<option value="1" class="selectStyleBlue">&nbsp;</option>
<option value="2" class="selectStyleRed">&nbsp;</option>
</select>
Jul 20 '05 #1
1 8569
In post <2f**************************@posting.google.com >
James said...
I'm trying to make a select box where each of 3 elements shows up as a
different color. I've gotten it working on the PC, but seem to be
having some troubles with the Mac/IE combo.


browser support for styling form elements varies and some
implementations are a little odd. for example:

with opera option{color:red;} doesn't color the <option> text red but
select{color:red;} does. with mozilla option{color:red;} colors the
first <option> the color of the <select> but the other <options> are
red. in IE all the <options> are red.

--
brucie a. blackford. 03/August/2003 09:40:49 am kilo.
http://loser.brucies.com/
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: James | last post by:
I'm trying to make a select box where each of 3 elements shows up as a different color. I've gotten it working on the PC, but seem to be having some troubles with the Mac/IE combo. Apparently...
3
by: Billy | last post by:
Hello, I'm having a problem dynamically changing the color of a table background. I'm not sure exactly how to word this, but I'll give an example. I have a function called greentored(propname)...
2
by: James | last post by:
Are there any style elements that work on select elements on Apple/IE? I want colored text, colored background, or just about anything colored in a select drop-down but can't seem to make it work...
0
by: Francis Parsons | last post by:
Hi! I'm doubtful there's a workaround for this problem, but it's worth a shot. I'm using IE's (css) "zoom" property to zoom the body of a document (in conjunction with persistance so the...
9
by: Matt Bostock | last post by:
Hi, Can someone confirm whether it's possible to set the background-color property in CSS for a table row (<tr>)? My code is: table { display: table; table-layout: fixed; } tr { display:...
4
by: Franklin | last post by:
WITHOUT KNOWING ANYTHING ABOUT THE CURRENT COLORS, I want to swap the foreground/background colors of a link when someone hovers over it. Is this possible with HTML, CSS, DOM, & JavaScript? If...
8
by: Bosconian | last post by:
I have two multiple select inputs. Initially the first contains a bunch of items and the second is empty. Using a common method, I move items back and forth by double clicking on them. This...
19
by: david.karr | last post by:
If in my CSS I set the "background-color" property on the "body" element, it only covers the background of the elements defined in the body, up to the current width and height of the page. However,...
3
by: ibeehbk | last post by:
Hi. I have a form made in xhtml. I test via vbscript to make sure none of the fields are empty and properly formatted (ie email). All the regular fields work. However, I have two drop down menus...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.