A
A
Anatoly2014-04-12 17:36:46
css
Anatoly, 2014-04-12 17:36:46

How to output separate CSS to a separate category in DLE ?

Good afternoon, gentlemen, here is an idea to diversify the site a bit (CMS DLE). There are let's say categories: "News" "Games" and let's say "Reviews". By default it outputs from

.news .category
background: #fd5559;

It applies to all categories, of course, as to "News":
21b734f2d25c4da29971ab57282e6a84.png
So, let's say the category "Reviews":
dc01402b977c48188cf988e89799a408.png
So here's the question:
How to make it so that there is one color for the "News" section, and a completely different one for the "Reviews" section? .

Answer the question

In order to leave comments, you need to log in

4 answer(s)
P
Pavel Belousov, 2014-04-15
@ABasist

Something like this:

.category {background: #ccc;}
.category.news {background: #f96;}
.category.hitech {background: #00f;}
.category.rewiew{background: #0f0;}

A
Anatoly, 2014-04-12
@ABasist

@abdurahmanich
And what about the default ?:
The style that is displayed:

.news .category {
    float: left;
    background: #fd5559;
    min-width: 37px;
    height: 32px;
    padding: 0 10px 0 10px;
    line-height: 30px;
    margin-left: 0px;
    width: 67px;
    text-align: center;

W
wiliams, 2014-04-12
@wiliams

Can you link to the site, very interesting

A
Anatoly, 2014-04-12
@ABasist

@abdurahmanich I still can't figure out how to implement it. After all, the content of the category menu is like this (menu.tpl file):

<ul class="topmenu" id="topmenu">
    <li>
        <a href="/" title=" Главная"><img src="{THEME}/images/logo.png" width="230" height="45" /></a>          
        <a href="news" title="TEST"><b>НОВОСТИ</b></a>
        <a href="internet" title="Internet"><b>ИНТЕРНЕТ</b></a>
        <a href="science" title="Наука"><b>НАУКА</b></a>
</ul>

And you need what would be displayed in the shortstory.tpl file . And in this file is the same standard <div class="category">{link-category}</div>with CSS:
.news .category {
    float: left;
    background: #fd5559;
    min-width: 37px;
    height: 32px;
    padding: 0 10px 0 10px;
    line-height: 30px;
    margin-left: 0px;
    width: 67px;
    text-align: center;

Here is the desired result:
6dfad5e0dd6844cf9f6724321be68ffc.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question