View Full Version : Set Checkbox background color - IE6
ismailc
02-27-2008, 01:58 PM
Hi, I need help.
I want to set the the checkbox background color in IE6, but it does not seem to be possible:
i tried: style="background-color : red;"
Any Ideas?
Regards
boogyman
02-27-2008, 02:38 PM
unless you create your own customer check boxes for checked and unchecked, I believe the white background cannot be overwritten. now on a different note, just applying the value "red" to a background-color leaves the browser to use whatever it has been set as default for that color type. It would be better if you used the hexadecimal value.
ismailc
02-28-2008, 06:50 AM
Hi, Thank You
I have so many checkboxes on my form & this is my reject task checkbox and i want this one to stand out and different.
any ideas or examples?
Regards
rangana
02-28-2008, 07:22 AM
..a brilliant idea to make the checkbox stand out...It should keep you going,, see this code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title></title>
</head>
<body>
<input type="checkbox" name="test" style="background:#f00;">Observe this one<br/>
<input type="checkbox" name="test"><br/>
<input type="checkbox" name="test"><br/>
<input type="checkbox" name="test"><br/>
<input type="checkbox" name="test"><br/>
<input type="checkbox" name="test"><br/>
<input type="checkbox" name="test"><br/>
<input type="checkbox" name="test"><br/>
<input type="checkbox" name="test"><br/>
<input type="checkbox" name="test"><br/>
<input type="checkbox" name="test"><br/>
<input type="checkbox" name="test"><br/>
</body>
</html>
See if it helps :D
ismailc
02-28-2008, 07:45 AM
Hi, unfortunately, i'm have an xslt file that loads my page & only have the style property to work with!
can i not change the color of the border?
rangana
02-28-2008, 07:51 AM
Apparently, having the background property will seem to color the border.
Have you given the code a try? :D
ismailc
02-28-2008, 08:00 AM
Yes, i did - but nothing
the checkbox was still the same default as the others!
background:#f00; (within the style property)
rangana
02-28-2008, 08:36 AM
Well this is working for me, both in IE6,7 and FF, maybe because I don't have any other settings on my checkbox. Just a wild guess, you might have set your checkbox CSS property globally.
Well if that is the case, and I thought which has the , just assign a class in your checkbox that you want to be distinct from the other, and use that class in your CSS.
Hope make some sense :D
ismailc
02-28-2008, 09:04 AM
Hi, i can't really set it globally as i then would have to edit the xslt file & affect all other check boxes.
silly ques, can i change the look of the checkbox to look like a radio buttons
i guess not as i can't even set the borders of the checkbox - how am i still going to change the shape!
Thanks for all help, regards
rangana
02-28-2008, 10:08 AM
Now...I don't even know what's the difference of an XSLT file to a normal webpage using html/xhtml.
You could have one option. You could put the check box that you want to be distinct in a <span> and put some styles on the span, though the checkbox will not change, but that area of the checkbox will be distinct...and if nothing works, I would tell that this is my wits end. My apologies :D
ismailc
02-28-2008, 10:15 AM
Hi, Thanks for all the help - unfortunately i am not allowed not to edit the xslt file.
Thank You - but i'm no longer going to bother as it would have been nice but not a must!
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.