Take this code:
#wh_wrapper #slider .scrollButtons.left { width: 100px; }
100px width only applies to:
#wh_wrapper -> #slider -> scollButtons left
If I do this:
.left { width: 50px; }
all
.left
classes now have a width of 50 pixels, including the previous one.
Now I fully understand how to avoid this error (setting specific classes, setting .left before #wh_wrapper # slider.scrollButtons.left, etc.), which I ask if there is a way to specify properties that cannot be overwritten by "global "properties.
I hope I could explain myself.
thanks
EDIT:
Now I got it! important: -)
But look at this other example:
#wh_wrapper #slider .scrollButtons.left { width: 100px !important; } .left { width: 50px; }
Now #wh_wrapper # slider.scrollButtons.left will still be 100px, but what about:
.left { width: 50px; border: 1px solid #000; }
since I didn’t decal the border before I can’t put the important value in it, anyway #wh_wrapper # slider.scrollButtons.left will now have a border property. Anyway this?
source share