Answer the question
In order to leave comments, you need to log in
@media attribute not working?
Hello. Styles do not work through the media attribute for the block. Everything works fine for other blocks, but not for .header. Here is the html:
<div class="header">
<div class="container">
<div class="header__content">
<div class="row">
<div class="text col-xl-5">
<h2 class="title">Никита Шелудько</h2>
<h3 class="title">Никита Шелудько</h2>
<p class="subtitle">Веб-разработчик, верстальщик, веб-дизайнер</p>
</div>
<img src="img/me.png" alt="" >
</div>
</div>
</div>
</div>
@media screen and (max-width: 840px) {
.header{
background:red;
.header__content{
.text{
font-size: 2em;
}
}
}
Answer the question
In order to leave comments, you need to log in
Wrap media in .header.
.header {
@media (max-width: 840px) {
/*стили для header*/
1 well, obviously something with indents
2 Sass is written without brackets, did you mean scss?
try to refer to &__content
Well, it immediately caught my eye
, there is not enough closing curly brace
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question