Forums

  • # July 6, 2013 at 10:40 am

    Hello,

    How do i solve inline !important ;?

    i tired !important !important but its not work .

    !important !important property is right kind property or not ?
    plz clear this issue n help me.

    http://codepen.io/anon/pen/Eparg

    # July 6, 2013 at 10:45 am

    Why are you using `!important`?

    You can’t double up on it and make it “stronger”.

    Inline CSS will, as a general rule, override any CSS in your stylesheet assuming the same level of specificity.

    # July 6, 2013 at 10:47 am

    declaration space !important single one;

    width:1000px !important;

    having important both inline and in css file the inline declaration applies

    # July 6, 2013 at 12:08 pm

    Not impossible: you can override it by adding another inline style after that:

    But that’s definitely the only way, I think.

    # July 6, 2013 at 12:43 pm

    a solution is to remove the style attribute all together and then set the width manually if thats the only style you want to apply or add a class with all the styles you want

    $(‘.fluid’).removeAttr(‘style’).css(‘width’,’100px’);

    im using jquery in the example

    # July 8, 2013 at 12:57 am

    Thanks

    # July 8, 2013 at 1:35 am

    hi,
    you no need to use !important in your inline style. you just add float:left;

    .fluid {
    width:100% ;
    background:#555;
    color:#fff;
    float:left;
    }

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

icon-anchoricon-closeicon-emailicon-linkicon-logo-staricon-menuicon-nav-guideicon-searchicon-staricon-tag