P
P
Programist189462020-04-20 12:59:20
css
Programist18946, 2020-04-20 12:59:20

How to make certain parameters propagate to a certain id?

<div id="column-center">
        <div class="news-item-props">
          <a id="teg" href="#">/Политика</a>
          <h1>В крым отреагировали на слова Кравчука</h1>
          <div id="date"class="news-date"> 19 июня 2018</div>
          <div class="news-time">10:48</div>
        </div>
      </div>


Here is the code, for example, the “news-date” class has other elements, only another “column” how to make the parameters in CSS so that the parameters refer, for example, to the “news-time” class, but only to the one that is in the id “column-center”

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
Fin Del, 2020-04-20
@Programist18946

#column-center .news-time {
  font-size: 20px;
}

let's say you have a 2 column with id column-centerand in this 2 column you want to change .news-time, then you can refer to it like this:
#column-center:nth-child(2)  .news-time{
  font-size: 40px;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question