Answer the question
In order to leave comments, you need to log in
Why doesn't the :nth-child pseudo-class work for me?
Please help me understand
html
<ul class="menu d-flex">
<li><a href="#main" class="menu__item">Main</a></li>
<li><a href="#features" class="menu__item">Features</a></li>
<li><a href="#gallery" class="menu__item">Gallery</a></li>
<li><a href="#team" class="menu__item">Team</a></li>
<li><a href="#contacts" class="menu__item">Contacts</a></li>
</ul>
.menu {
justify-content: space-between;
padding: 50px 0;
}
.menu__item {
padding: 0 15px 37px;
border-bottom: 3px solid transparent;
position: relative;
z-index: 2;
}
.menu__item:nth-child(5) {
padding-right: 0;
}
Answer the question
In order to leave comments, you need to log in
public function getТ2()
{
return $this->hasMany(Т2::className(), ['t1_id' => 'id'])->onCondition(['user_id' => 500]);
}
public function getТ2()
{
return $this->hasMany(Т2::className(), ['t1_id' => 'id'])->where(['user_id' => 500]);
}
.menu__item
sole descendant<li>
And it's probably better to reset the last one
.menu > li:last-child > .menu__item { padding-right: 0; }
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question