Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS inline !important css issue

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #46158
    Rachana
    Participant

    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

    #141730
    Paulie_D
    Member

    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.

    #141732
    pixelgrid
    Participant

    declaration space !important single one;

    width:1000px !important;

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

    #141736
    Senff
    Participant

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

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

    #141746
    pixelgrid
    Participant

    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

    #141853
    Rachana
    Participant

    Thanks

    #141858
    bablucolno
    Participant

    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)
  • The forum ‘CSS’ is closed to new topics and replies.