Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    May 2005
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Targeting Radio Buttons from css

    Hi all,

    Is there a way to target radio buttons from css without classing them all in the html?

    I tried 'form.radio' and 'form radio' but neither seem to work

    The end result I'm trying to get is that IE and Opera are showing borders around the radio buttons. Assuming this is because I have borders set elsewhere for the 'input' boxes. Since a radio is also an input... I'm looking for a way to turn them off.

    Thanks,
    Will

  • #2
    Senior Coder
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    2,636
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You can normally use 'input.radio' but I just tried making an example and it didn't work...

  • #3
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Quote Originally Posted by mark87
    You can normally use 'input.radio' but I just tried making an example and it didn't work...
    That would work mark if you gave a class to the input radio buttons.
    class="radio"

    Now if IE wasn't so behind in standards you could use this
    Code:
    input[type=radio] {
    border:0;
    }
    However IE doesn't support that so you will have to give a class to your radio buttons and style them with CSS or use javascript to go through all of the radio buttons to change their borders.

  • #4
    Regular Coder
    Join Date
    May 2005
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by _Aerospace_Eng_
    That would work mark if you gave a class to the input radio buttons.
    class="radio"
    lol. yeah, oops.

    thanks for your replies every one. I've just ditched the borders at this point and let the browser use the OS borders.


    Take care,
    Will


  •  

    Posting Permissions

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