I’ve been having several problems with Safari over the past 2 days while developing a small application for a client.
I have a <select> dropdown in my HTML template page, and I inserted a class attribute into the <select> tag and each of the <option> tags in order to change the backgound colors of the different options.
The last three <select> dropdowns have their background colors set with JavaScript according to the selection of the first, but I should be able to sort that out if I can get the CSS problem sorted on the first <select> element.
I also don’t have a Mac, and I don’t have a browser that uses the same rendering engine as Safari, otherwise I would’ve been willing to play around and test it out.
I hope that someone will be able to assist me in this matter.
Tyssen, above “edit” there’s an option to delete the post. Just click the “Delete” radio button, enter a reason for the deletion, and click “delete this post.”
I’ve played around (and tried everything) with my HTML/CSS and it seems like it’s impossible to style the background color of these <select> boxes in Safari. Or not?
Any alternatives? Has anyone been able to change the background color of <select> boxes in Safari?
hmmm, I think that if it is a really important message to portray with the style it needs to be done in some other way - if color isn’t the answer then perhaps you should look for another way to display the difference in options.
A client doesn’t want to hear an excuse. They just want to see a result… i’m off to make mine happy good luck.
You’re absolutely right!
(i was kidding about the excuse)
I’m emailing my client with a different suggestion.
I was thinking of placing some padding around the select boxes with a 2-3 px border. I can have these borders change colors accordingly.
Edit :
I might even just do the text color. Could work…
I wonder if faking it with JavaScript could work… it might be bit overkill, but one never knows (and no, I don’t have a Mac, and I never bothered to find out for myself beforehand).
The JS doesn’t work either. Atleast not by trying to set the style or class attribute.
As stated in the first post, the last 3 boxes have their background colors changed with JS according to the selection of the first select box.
Anyhow…
Each <select> is inside a <div> so I’ll use some padding and have the background color of the <div> change to form a thin colored border around the form element.