How to add new property within existing css?


Tags: css

Problem :

I have two css file.I have a class following in one css below

input[type="submit"], input[type="button"], .butLink {
    padding: 3px 9px;
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;
    -khtml-border-radius: 3px;
    border-radius: 3px;
    -moz-box-shadow: inset 1px 1px 0 rgba(255,255,255,0.3);
    -webkit-box-shadow: inset 1px 1px 0 rgba(255,255,255,0.3);
    box-shadow: inset 1px 1px 0 rgba(255,255,255,0.3);
    font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;

    color: #FFFFFF;
    background: #A5BD24;
    background: -moz-linear-gradient(top, #A5BD24 0%, #7DAC38 100%);
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#A5BD24), color-stop(100%,#7DAC38));
    background: -webkit-linear-gradient(top, #A5BD24 0%,#7DAC38 100%);
    background: -o-linear-gradient(top, #A5BD24 0%,#7DAC38 100%);
    background: -ms-linear-gradient(top, #A5BD24 0%,#7DAC38 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a5bd24', endColorstr='#7DAC38',GradientType=0 );
    background: linear-gradient(top, #A5BD24 0%,#7DAC38 100%);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
    border: 1px solid #781;
}

Now I want to change this style from another css file.I tried following below which isnt working -

input[type="submit"], input[type="button"], .butLink
{
    background-color:#000 !important;
}

Any Idea?



Solution :

Writing background will override previously defined properties.

Write:

input[type="submit"], input[type="button"], .butLink{
    background:#000;
}

    CSS Howto..

    How to Remove CSS line-through

    How to not inherit width in css?

    How to change navbar background color after page has scrolled down

    How to apply css to id generated dynamically?

    How to differentiate the common css class by using other css class

    Shouldn't adapting the scree size of a fluid layout in the desktop show how the site should look for mobile?

    How to create a natural-looking line using css and maybe javascript? [closed]

    How to automatically choose which css to use depending on the URL/website and/or server I'm on?

    How to import a css file in a react component?

    How can I change the entire background color of a page?

    how to switch to another view using css class on click in angularjs using ngclass

    How to include SASS into CSS

    How to clip canvas with CSS clip-path?

    How to apply remaining width to a div in the middle of 2 other divs

    How to animate 2 css layouts from left to right or from right to left with jquery?

    How to format this form using only CSS

    How to do a resizable link a:hover in CSS

    How to get my navbar to fluidly contain the largest element?

    How can I fill the remaining space when dealing with an inline ul?

    CSS rule doesn't show up in developer tools

    How to get the content of the bottom element of a flexbox to be 100% height its container

    How can I centralize a list with css?

    How to define link text color in UIWebView

    CSS Horizontal Menu is showing list bullets

    how to make slide animation?

    How to fade the background-image to black with CSS?

    Codeigniter Form Validation - Showing Errors Individually problems

    How to remove borders around a div (nav, footer, whatsoever) in a WordPress theme? [closed]

    how to make a child div visible when clicking its parent div in pure css

    how to make a css border for div