Hello,
I would like to know about !important property in css.
I am using this function in class like below example.
------------------------------------------------------------------------
.show_bg{
background:#FAFAFA!important;
padding-top:18px!important;
margin-top:-10px!important;
}
------------------------------------------------------------------------
can i use !important one time for all property instead of giving separately.
Plz suggest me if there is any solution for that.
Thanks in advance
Regards
Peeyush Gupta
You have to apply !important
You have to apply !important to each declaration in a rule set; it can't be used just once to apply to all declarations. But really, if you need to apply !important to each declaration like you have, you're doing something wrong. !important should only be used in limited situations like overriding inline styles.
Use */> tags.
Thanks for your help.
I know you are right. But conditions are happen where i need to use
declaration in every rule set.
Well plz let me know about this tag */>
Thanks in advance.
Regards
Peeyush Gupta
919928362554
Peeyush wrote: But conditions
But conditions are happen where i need to use declaration in every rule set.
Well it's hard to say without seeing any code, but I've never come across an instance where you need to use it for every rule set so I think your conditions probably need changing.
Well plz let me know about this tag */>
It's the button you press when you want to enter code with your posts on this forum.