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 3 of 3
  1. #1
    New Coder
    Join Date
    Sep 2005
    Posts
    68
    Thanks
    0
    Thanked 0 Times in 0 Posts

    cancel out a css style for a button

    I have a style which is applied to all inputs. However, I don't want that applied to one button in particular. How can I tell it not to use the style which looks like:
    Code:
    input {
         border:1px solid black;
         background-color:#CCCCCC;
    }

  • #2
    New Coder
    Join Date
    Dec 2005
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    one way is to make a class for button and use that class or you can give inline style for buttons only.

  • #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
    Or if you simply don't care about IE
    Code:
    input[type=submit] {
         border:0;
         background:none;
    }
    IE doesn't support the above method, any other browser does though.
    Of course this would only work on submit buttons but other types can be styled as well but best solution is to probably to what kallo said.


  •  

    Posting Permissions

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