Home › Forums › Other › Why does this positioning work the way it does › Reply To: Why does this positioning work the way it does
December 12, 2014 at 10:42 am
#190677
Participant
Your question (I think) is about how CSS works, not how positioning works.
The Cascade will follow importance, specificity and source order. So if you’re not being more specific with your selectors, or you’re not labeling things as important, if it’s further down the source it will overwrite stuff up above.
Of course in this case, you’re doing both, you’re being more specific by using a class and making it further down the source. If you use a code inspector, you’ll see that the CSS that was declared for just sup
is being overwritten by sup.frac
. In fact, the bottom: inherit
on sub.frac
is actually unnecessary.