SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast pravatr's Avatar
    Join Date
    Feb 2007
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question CSS help needed checkbox

    Hi,

    I use the following code to set styles for form elements:

    INPUT{
    font-family:verdana;
    font-size: 11px;
    border: 1px solid #999999;
    }

    Unfortunately,

    this causes also <INPUT type="checkbox"> and <INPUT type="radio"> to have thin borders, and client donít want them.
    Is there an possibility to remove these borders? I know from input[type=checkbox] {border: none} can be removed but this only for mozilla not IE.
    Donít suggest me, to put classes in code for instance textfield, passwordfield etc etc as we cant touch them, those are system generated.

    Help needed, please!!

  2. #2
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,122
    Mentioned
    29 Post(s)
    Tagged
    2 Thread(s)
    Hi,

    You can use something like:
    Code:
    input[type="checkbox"] {
      /* CSS */
    }
    You would want to see though which browsers support these type selectors..

  3. #3
    SitePoint Enthusiast pravatr's Avatar
    Join Date
    Feb 2007
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    input[type="checkbox"] {
    /* CSS */
    }

    This class doesn't works in al browser.

  4. #4
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's not a class.

  5. #5
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,122
    Mentioned
    29 Post(s)
    Tagged
    2 Thread(s)
    pravatr,

    There's no way I know of selecting different types of inputs with CSS Selectors other than what I posted - Or using other markup like a class..

    Expecting IE to be supportive of what you need will leave you heartbroken..

  6. #6
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by pravatr View Post
    Hi,

    input[type="checkbox"] {
    /* CSS */
    }

    This class doesn't works in al browser.
    No, so you'll need to make up a class and add it to the inputs with a type of checkbox or radio.


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
  •