Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Set Checkbox background color - IE6

  1. #1
    Join Date
    Dec 2007
    Posts
    88
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question Set Checkbox background color - IE6

    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

  2. #2
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    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.

  3. #3
    Join Date
    Dec 2007
    Posts
    88
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question Thank You

    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

  4. #4
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    ..a brilliant idea to make the checkbox stand out...It should keep you going,, see this code:
    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
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  5. #5
    Join Date
    Dec 2007
    Posts
    88
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question Unfortunately

    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?

  6. #6
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    Apparently, having the background property will seem to color the border.
    Have you given the code a try?
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  7. #7
    Join Date
    Dec 2007
    Posts
    88
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Yes, i did - but nothing

    Yes, i did - but nothing

    the checkbox was still the same default as the others!

    background:#f00; (within the style property)

  8. #8
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    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
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  9. #9
    Join Date
    Dec 2007
    Posts
    88
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Can't really set it globally

    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

  10. #10
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    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
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •