Всем привет! Это можно сказать продолжение моих граблей в процессе адаптации сайта:) В общем адаптировал я одну страницу, все зашибись. Приступаю я к второй странице. Прописываю
@media all and (max-width: 1920px) and (min-width: 1601px){}
который прекрасно работал на первой странице.
Пишу внутри стили. А они не применяются. В инспекторе @media нету. И вот что делать не знаю. @media находиться в конце файла. В интернете ничего толкового не нашел:(
@media all and (max-width: 1536px) and (min-width: 1501px) {
.block__three-block-bank-text-grey-two{
left: 14%;
}
}
Вот на скрине в элементах видно что @media нету. cсылка на сайт: https://websitetestingfreelance.000webhostapp.com/banks.html
@font-face {
font-family: 'Proxima Nova Light';
src: url('../fonts/ProximaNova-Light.eot');
src: url('../fonts/ProximaNova-Light.eot?#iefix') format('embedded-opentype'),
url('../fonts/ProximaNova-Light.woff') format('woff'),
url('../fonts/ProximaNova-Light.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Proxima Nova Bold';
src: url('../fonts/ProximaNova-Bold.eot');
src: url('../fonts/ProximaNova-Bold.eot?#iefix') format('embedded-opentype'),
url('../fonts/ProximaNova-Bold.woff') format('woff'),
url('../fonts/ProximaNova-Bold.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Proxima Nova Extra Bold';
src: url('../fonts/ProximaNova-Extrabld.eot');
src: url('../fonts/ProximaNova-Extrabld.eot?#iefix') format('embedded-opentype'),
url('../fonts/ProximaNova-Extrabld.woff') format('woff'),
url('../fonts/ProximaNova-Extrabld.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Proxima Nova Thin';
src: url('../fonts/ProximaNovaT-Thin.eot');
src: url('../fonts/ProximaNovaT-Thin.eot?#iefix') format('embedded-opentype'),
url('../fonts/ProximaNovaT-Thin.woff') format('woff'),
url('../fonts/ProximaNovaT-Thin.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
*{
padding: 0;
margin: 0;
}
body{
overflow-x: hidden;
}
.header{
width: 100%;
height: 3vw;
background: #FFFFFF;
box-shadow: 0px 25px 250px rgba(0, 0, 0, 0.1);
}
.header-logo{
position: absolute;
top: 1%;
left: 15%;
}
.header-menu-nav-button{
height: 5%;
width: 2.5%;
top: 0.5%;
right: 15%;
position: absolute;
cursor: pointer;
}
.header-lines{
width: 80%;
height: 7%;
margin-left: auto;
margin-right: auto;
background: #5cd648;
margin-top: 21%;
}
.second-menu-line{
width: 40%;
margin-right: 0;
margin-left: 49%;
}
.third-menu-line{
width: 65%;
margin-right: 0;
margin-left: 26%;
}
.block__one{
width: 100%;
height: 30vw;
position: relative;
background: linear-gradient(180deg, #FFB522 0%, #FFBC2F 27.08%, #FEBB2B 53.65%, #FFB410 79.17%, #FDA400 89.06%, #EF9501 100%);
}
.block__one-img{
position: absolute;
right: -10%;
bottom: 0;
}
.block__one-credit{
color: white;
font-size: 64px;
width: 65%;
top: 25%;
font-family: 'Proxima Nova Light';
letter-spacing: 5px;
position: absolute;
left: 15%;
line-height: 90px;
}
span{
font-family: 'Proxima Nova Extra Bold';
letter-spacing: 1px;
}
.buttom-arrow{
position: absolute;
left: 5%;
top: 25%;
transform: rotate(180deg);
}
.block__one-input{
background: #FFFFFF;
box-shadow: 5px 0px 25px rgba(0, 0, 0, 0.05);
border-radius: 5px;
width: 18%;
top: 70%;
left: 15%;
height: 4vw;
position: absolute;
}
.block__one-buttom{
background: #5CD648;
border-radius: 0px 5px 5px 0px;
width: 18%;
top: 70%;
left: 32.8%;
height: 4vw;
position: absolute;
cursor: pointer;
}
.block__one-buttom-text{
position: relative;
text-align: center;
top: 36%;
text-transform: uppercase;
color: white;
font-family: 'Proxima Nova Bold';
font-size: 16px;
}
.bottom-text{
position: relative;
text-align: center;
top: 36%;
text-transform: uppercase;
color: white;
font-family: 'Proxima Nova Bold';
font-size: 16px;
}
.block__one-input-text__grey{
position: relative;
float: left;
color: #7A7C80;
font-size: 15px;
font-family: 'Proxima Nova Light';
font-weight: lighter;
margin-left: 30%;
left: -20%;
top: 15%;
text-transform: uppercase;
}
.block__one-input-text__bold{
font-family: 'Proxima Nova Bold';
font-size: 24px;
float: left;
top: 15%;
margin-left:15%;
left: -5.5%;
position: relative;
}
.input-text{
font-size: 13px;
font-family: 'Proxima Nova Light';
font-weight: lighter;
text-transform: uppercase;
}
.block__two{
width: 100%;
height: 25vw;
position: relative;
top: 30%;
}
.block__two-text__main{
font-family: 'Proxima Nova Light';
font-weight: lighter;
font-size: 42px;
left: 14%;
top:10%;
position: absolute;
}
.text-main{
font-family: 'Proxima Nova Light';
font-weight: lighter;
font-size: 42px;
left: 14%;
top:10%;
position: absolute;
}
.block__two-text-sub-grey{
color: #989898;
font-size: 16px;
font-family: 'Proxima Nova Light';
font-weight: lighter;
position: relative;
left: 14%;
top: 23%;
}
.block__two-block-bank{
background: #FFFFFF;
box-shadow: 5px 0px 25px rgba(0, 0, 0, 0.05);
border-radius: 5px;
position: relative;
left: 14%;
width: 75%;
top: 40%;
height: 7vw;
}
.block__two-bank__logo{
top: 23%;
left: 2%;
position: absolute;
}
.block__two-recomendation-text{
color: #FFB522;
font-family: 'Proxima Nova Light';
position: absolute;
top: 65%;
left: 3.1%;
}
.block__two-block-bank-line{
position: absolute;
height: 100%;
border: 2px solid #F7F7F7;
left: 15%;
}
.block__two-block-bank-text-grey{
font-family: 'Proxima Nova Light';
text-transform: uppercase;
font-weight: lighter;
color: #7A7C80;
font-size: 13px;
position: relative;
float: left;
margin-left: 5%;
left: 13%;
top: 30%;
}
.text-grey{
font-family: 'Proxima Nova Light';
text-transform: uppercase;
font-weight: lighter;
color: #7A7C80;
font-size: 13px;
position: relative;
float: left;
margin-left: 5%;
left: 13%;
top: 30%;
}
.block__two-bank-block-text__black{
float: left;
position: relative;
font-family: 'Proxima Nova Light';
text-transform: uppercase;
left: -47%;
top: 50%;
}
.block__two-bank-block-text__black-one{
color: #5cd648;
}
.block__two-bank-block-text__black-two{
left: -40.5%;
}
.block__two-bank-block-text__black-three{
left: -34.8%;
}
.block__two-bank-block-text__black-fore{
left: -30.6%;
}
.block__two-bank-block-text__black-five{
left: -24.4%;
}
.block__two-bank-block-text__black-six{
left: -20.8%;
}
.block__two-block-bank-buttom{
position: absolute;
width: 15%;
left: 81.5%;
top: 28%;
height: 40%;
background: #5CD648;
border: 0;
cursor: pointer;
box-sizing: border-box;
box-shadow: 0px 4px 10px rgba(92, 214, 72, 0.15);
border-radius: 100px;
}
.block__two-buttom-text{
font-size: 13px;
}
.block__three{
position: relative;
width: 100%;
height: 70vw;
top: 0vw;
}
.block__three-clock-img{
position: absolute;
top: 3.4%;
right: 40%;
}
.block__three-update{
position: absolute;
font-family: 'Proxima Nova Light';
font-weight: lighter;
color: #989898;
font-size: 18px;
top: 3.6%;
right: 21%;
}
.block__three-block-bank-text-grey{
top: 7vw;
margin-left: 5%;
}
.block__three-block-bank-text-grey-one{
left: 12.3%;
}
.block__three-block-bank-text-grey-two{
left: 12%;
}
.block__three-block-bank-text-grey-three{
left: 9.5%;
}
.block__three-block-bank-text-grey-fore{
left: 8.4%;
}
.block__three-block-bank-text-grey-five{
left: 7.1%;
}
.block__three-block-bank-text-grey-six{
left: 5.7%;
}
.block__three-block-bank-text-grey-six{
left: 5.7%;
}
.block__three-block-bank-text-grey-seven{
left: 5%;
}
.block__three-text__main{
top: 2%;
}
.block__three-block-bank{
position: relative;
top: 15%;
margin-top: 1%;
}
.block__hree-bank-block-text__black{
left: 12%;
top: 42%;
margin-left: 5%;
}
.block__three-bank-text__black-block__one{
top: 10%;
margin-right: 0%;
left:22.4%;
}
.bank-block-three-25{
top: 40%;
left:-75.5%;
}
.bank-block-three-green{
color: #5cd648;
font-size: 25px;
}
.block__three-recomendation-text-two{
color: #2D4D7A;
}
.block__three-recomendation-text-three{
color: #FE471F;
}
.block__three-recomendation-text-fore{
color: #5CD648;
}
.block__borrower{
width: 100%;
height: 20vw;
position: relative;
top: 0vw;
}
.block__borrower-img{
position: relative;
margin-left: 22%;
left: -13%;
top: 8vw;
}
.block__borrower-img-two{
top: 7.2vw;
}
.block__borrower-img-three{
top: 6.5vw;
}
.block__borrover-text__sub{
font-family:'Proxima Nova Light';
font-weight: lighter;
float: left;
width: 20%;
margin-left: 5.2%;
left: 9%;
top: 20%;
position: relative;
}
.block__yellow{
position: relative;
width: 75%;
background: #FFB522;
height: 25vw;
margin: auto;
top: 0vw;
}
.block__fore{
background: #FEB71F;
position: relative;
width: 100%;
margin: 0;
height: 28vw;
top: 0vw;
}
.block__yellow{
background: #FEB71F;
position: relative;
width: 70%;
left:14%;
height: 28vw;
top: 0vw;
}
.block__fore-text__main{
color: white;
left: 4%;
}
.block__fore-blocks__mini{
position: relative;
height: 18%;
float: left;
width: 28%;
top: 32%;
margin-left: 3.9%;
}
.block__fore-blocks__big{
position: relative;
height: 32%;
float: left;
width: 28%;
top: 41%;
margin-left: 3.9%;
}
.block__fore-img{
position: relative;
top: 1vw;
}
.block__fore-block__text{
font-family:'Proxima Nova Light';
font-weight: lighter;
font-size: 15px;
color: white;
left: 7%;
position: relative;
}
.block__six{
width: 100%;
height: 15vw;
position: relative;
top: 0vw;
}
.block__six-block__grey{
width: 100%;
height: 20vw;
top:-5vw;
z-index: -1;
position: absolute;
background: #1C2331;
}
.block__grey-img{
position: relative;
top: 35.5%;
left: 15.5%;
}
.block__grey-img-two{
top: 47%;
left: 14.3%;
}
.block__grey-img-three{
top: 57.8%;
left: 13.1%;
}
.block__grey-img-fore{
top: 69.5%;
left: 12%;
}
.block__grey-img-five{
top: 81%;
left: 10.85%;
}
.block__grey-text{
font-family:'Proxima Nova Light';
color: white;
font-weight: lighter;
font-size: 15px;
position: absolute;
left: 17%;
top: 35%;
}
footer{
background: #131925;
width: 100%;
height: 4vw;
position: relative;
top: 0vw;
}
.footer__copyrating{
color: #7A8291;
font-family:'Proxima Nova Light';
font-size: 15px;
font-weight: lighter;
top: 38%;
left: 15%;
position: absolute;
}
.footer__polytics{
font-family:'Proxima Nova Light';
font-size: 15px;
text-transform: 12px;
color: white;
text-decoration-line: underline;
top: 38%;
right: 15%;
position: absolute;
cursor: pointer;
}
@media all and (max-width: 1536px) and (min-width: 1501px) {
.block__three-block-bank-text-grey-two{
left: 14% !important;
}
}
Если нужен диапазон - то у Вас написано корректно. Просто ширину Вы вводите очень большую. Попробуйте от 1200 до 1000. (протестировано)
@media all and (max-width: 1200px) and (min-width: 1000px) { //Добавить , and
.block__three-block-bank-text-grey-two{
left: 14% !important;
}
}
Ширина 1430px
Ширина 1180px
Ширина 977px
Если Вы хотите задать несколько параметров, например для для screen
ширину 1000
, а для all
другую, то указывать и надо через запятую.
@media all and (max-width: 1200px), screen and (min-width: 1000px) { //Добавить , and
.block__three-block-bank-text-grey-two{
left: 14% !important;
}
}
Айфон мало держит заряд, разбираемся с проблемой вместе с AppLab
Подскажите как сделать так что бы div идущий после span в случае если в span много текста перемещался под span а не уезжал за пределы областиСпасибо
Имеется проблемаОформляю админ панель, страница делится на две части
Есть текст по типу: <p>Explore a vast, beautiful, and immersive world<br /> Explore a vast, beautiful, immersive, and dangerous world filled with gripping enemy encounters, challenging puzzles and thrilling escape sequencesUnravel...
Уважаемые пользователи stackoverflow, здравствуйтеНужен ваш совет