tonelm54
asked on
Type but not IDs
Im wondering if its possible to style all my labels on a page, but not those of a particular ID:-
eg:-
I know the above code doesnt work, but hopefully it will describe what Im doing.
Going forward I could say 'not default style' as something like:-
But obviously I dont know if this is even possible yet.
Thank you
eg:-
label :not(#lblTypeCompany) :not(#lblTypeVinci) {
width:200px;
background-color:blue;
}
I know the above code doesnt work, but hopefully it will describe what Im doing.
Going forward I could say 'not default style' as something like:-
label :not(.defaultStyle) {
width:200px;
background-color:blue;
}
But obviously I dont know if this is even possible yet.
Thank you
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
please clarify whst you mean by "not(.defaultstyle)"
what Gary is suggesting is that labels which do not have the "defaultStyle" class will get the specified properties.
but if what you're looking for is to remove some styling defined by the .defaultStyle{} rule somewhere in the css file, then such syntax does not exist in plain CSS
what Gary is suggesting is that labels which do not have the "defaultStyle" class will get the specified properties.
but if what you're looking for is to remove some styling defined by the .defaultStyle{} rule somewhere in the css file, then such syntax does not exist in plain CSS
label:not(#lblTypeCompany)
label:not(#lblTypeVinci) {
width:200px;
background-color:blue;
}
You might be able to do the second thing with a preprocessor like SASS