Не применяются стили css
Не применяются стили css к классу video_text(h4), что делать?
.video {
background-image: url('img/bg photo.png');
background-size: cover;
background-repeat: no-repeat;
background-position: center;
height: 800px;
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.video_description {
text-align: center;
}
.video_image {
margin-bottom: 45px;
cursor: pointer;
}
.video_image:hover {
box-shadow: 0 0 10px #fff;
border-radius: 50%;
transition: 0.5s;
}
}
.video_title {
margin: 0 auto;
margin-bottom: 30px;
width: 337px;
height: 22px;
font-family: 'Montserrat', sans-serif;
font-size: 30px;
font-weight: normal;
font-stretch: normal;
font-style: normal;
line-height: normal;
letter-spacing: normal;
text-align: center;
color: #ffffff;
}
.video_text {
margin: 0 auto;
margin-bottom: 40px;
width: 551px;
height: 43px;
font-family: 'Montserrat', sans-serif;
font-size: 16px;
font-weight: normal;
font-stretch: normal;
font-style: normal;
line-height: 1.75;
letter-spacing: normal;
color: #ffffff;
}
.video_time {
margin: 0 auto;
width: 36px;
height: 10px;
font-family: 'Montserrat', sans-serif;
font-size: 14px;
font-weight: normal;
font-stretch: normal;
font-style: normal;
line-height: 1.71;
letter-spacing: normal;
color: #c7b299;
}
<section class="video">
<div class="video_description">
<img src="img/icon-play.png" class="video_image">
<h4 class="video_title">Waxom Video Presentation</h4>
<p class="video_text">Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius, qui sequitur mutationem consuetudium.</p>
<p class="video_time">03:26</p>
</div>
</section>
Ответы (2 шт):
Автор решения: Анна Матвеева
→ Ссылка
У вас ведь h4 class="video_title стоит выше (отдельно) от div с классом video_text . Что бы применить стили к вашему h4 нужно в ccs прописать так:
.video_description h4{
}
или
h4.video_title{
}
Автор решения: pheroneex
→ Ссылка
У вас перед .video_title лишняя закрывающая скобка. Уберите ее и все заработает.