/    Sign up×
Community /Pin to ProfileBookmark

How to brutally overwrite all more specific CSS definitions down in hierarchy?

In general a more specific CSS definition for an element nested inside others overwrites to the more global definitions.

So a font-size: 15px rule in <P> overwrites the font-size: 18px in <body>

Thats fine in general.

However there are some specific situations where I want to brutally overwrite with a font-size property all other font-size definitions inside the assigned element.

How can I do this?

An “!important” CSS rule postfix let me only overwrite possibly existing rules on the same level (=for the current element) but NOT inside for all child elements!

Peter

to post a comment
CSS

1 Comments(s)

Copy linkTweet thisAlerts:
@nikolaydevAug 09.2017 — Here is how: https://jsfiddle.net/3z8zv6gu/

Notice the star.
×

Success!

Help @pstein spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.12,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...