- This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
Viewing 7 posts - 1 through 7 (of 7 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
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.
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.
declaration space !important single one;
width:1000px !important;
having important both inline and in css file the inline declaration applies
Not impossible: you can override it by adding another inline style after that:
But that’s definitely the only way, I think.
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
Thanks
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;
}