N
N
Nikita Ivanov2013-12-06 20:16:03
css
Nikita Ivanov, 2013-12-06 20:16:03

How to make normal display of different style on different pages/categories?

My goal is to make certain categories show a certain style.
So, the BODY tag picks up the category class.
The code:

.category-customstyle #header { background-color: #310062; }
- works
A code
.category-customstyle .page-title {background: #464646;}
.category-customstyle .page-title span { color: #fff; }
.category-customstyle body {background-image: url(xxx);}
does not want to work
I understand that I am doing something wrong, but I do not understand what.
Is it possible in a similar way to make the same code appear on certain pages and on pages of certain archives?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Polishchuk, 2013-12-06
@NorthDakota

Instead
of .category-customstyle body {background-image: url(xxx);}
Try
body .category-customstyle {background-image: url(xxx);}
For first you need to write selectors (tags) and only then classes

A
Artur Panteleev, 2013-12-06
@arturpanteleev

id selector always overrides class selector

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question