@kirzzzz

Почему элемент не смещается?

Там где комментарий "Прайс" элемент с классом "Price" в боксе "BoxPrice" не выравнивается по центру, хотя justify-content: center; указал
@charset "utf-8";
    
   *{margin: 0; padding: 0; border: 0;}
/*----------------------- ОСНОВЫ ------------------------------ */
body{
    width: 100%;
    height: 100%;
    color: #000000;
    background: white;
    background-image: url(img/IMG_1188.jpg);
    background-size: cover;
    background-attachment: fixed;
    font-size: 1em;
    font-family: 'Open Sans Condensed', sans-serif;
    line-height: 100%;
}
a {
    color:white;
    text-decoration: none;
}
a:hover {
    color:darkgray;
    text-decoration: none;
}
a:active {color:dimgrey}

img {
    max-width: 100%;
    height: auto;
    width: auto\9;
}

/*Блок для выделения*/
::selection{background:darkgray; color:aliceblue}
::-moz-selection{background:darkgray; color:aliceblue}

header, footer, main{
    width: 100%;
    min-width: 50px;
}

header{
    border-bottom: 0px solid silver;
    padding: 0;
}
/*----------------------- ШАПКА ------------------------------ */
#Page_top{
    display: flex;
    position: relative;
    padding: 0px !important;
    top: 0px;
    line-height: 112px;
    margin: 0px !important;
}
/*----------------------- КОНТЕЙНЕР ШАПКИ ------------------------------ */
.container{
    display: flex;
    flex-direction: row; 
    flex-wrap: nowrap; 
    width: 1260px;
    position:relative;
    padding: 0px !important;
    top: 0px;
    margin: 0 auto;
}
/*----------------------- БОКСЫ ШАПКИ ------------------------------ */
.container_logo{
    display: flex;
    flex-direction: row; 
    flex-wrap: nowrap;
    align-items:center;
    flex-basis: 30%;
    flex-shrink: 3;
    justify-content:flex-start;
    position:relative;
    padding: 0px !important;
    top: 0px;
    margin: 0px !important;
}


.container_info{
    display: flex;
    flex-direction: row; 
    flex-wrap: nowrap;
    flex-basis: 70%;
    justify-content:flex-end;
    position:relative;
    top: 0px;
    margin: 0px !important;
}

.MainLogo_img{
    width: 180px;
}
/*----------------------- БОКСЫ ПРАВОЙ ЧАСТИ ШАПКИ ------------------------------ */

.contact1,.contact2,.contact3,.contact4,.contact5{
    display: flex;
    text-align: center;
    flex-direction: row; 
    flex-wrap: nowrap;
    justify-content:flex-end;
    align-items:center;
    color: white;
    text-decoration: none;
    font-size: 2em;
    font-family: 'Open Sans Condensed', sans-serif;
    padding: 12px;
}
.contact1:hover,.contact2:hover,.contact3:hover{
    color:darkgrey;
}
/*----------------------- ЛОГО ИНСТЫ ------------------------------ */
.image_logo{
    display: flex;
    flex-basis: 20px;
    align-self: auto;
    justify-content:flex-start!important;
    height: 25px;
    width: 25px;
}
.image_logo:hover{
    filter:invert(100%);
}
/*----------------------- ПРАЙС ------------------------------ */

#BoxPrice{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap; 
    position: relative;
    flex-basis: 100%;
    justify-content: center;
    padding: 100px;
}
.Price{
    position: relative;
    align-items:center;
    display: flex;
    justify-content: center;
    flex-basis: 100%;
}

/*----------------------- ОПТИМИЗАЦИЯ ------------------------------ */
@media screen and (max-width: 1260px)
{
    .container{
        width:960;
    }
}
  • Вопрос задан
  • 91 просмотр
Решения вопроса 1
JRK_DV
@JRK_DV
Рецепты https://codepen.io/jrkdv/full/LKLXdq
в голове отрендерил ваши стили и если я правильно понял ваш вопрос, то надо добавить стиль
text-align: center для блока .Price, т.к. блок занимает весь размер родителя и центрироваться ему нет места...
а так никто не знает вашу вёрстку, что вы там написали ...
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы