D
D
Denis Shishkin2016-03-12 10:50:43
css
Denis Shishkin, 2016-03-12 10:50:43

Why is the CSS property being erased?

I'm new to css, so please explain without tomatoes). I am changing some styles in a Wordpress template. I noticed that some styles that I add for example ( font-weight: 600;) to the header are deleted after clearing the theme cache... I change or add properties directly in the theme files.
Or tell me how to do it right?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
semki096, 2016-03-12
@semki096

The browser has a developer tool - study it. If styles are overwritten, you will see that they are crossed out, and you will also see which style takes precedence and overwrites your style.

C
Cyber_bober, 2016-03-12
@Cyber_bober

Are you sure they are erased? maybe they are re-enacted with other styles? try adding
font-weight:600 !important;

C
CrewCut, 2016-03-12
@CrewCut

If you add a style in the theme admin panel, then it can be erased if the cache of the same theme is cleared from the same admin panel. Try adding the code you need to the very end of the style.css file and see if it helps

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question