473,388 Members | 1,496 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,388 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 8565
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.