2
Вопрос: как заставить ввод растягиваться до 100% в flexbox div с помощью justify-content center
вопрос создан в Wed, May 8, 2019 12:00 AM
Я не могу получить ввод во фрагменте ниже, чтобы растянуть на 100% содержащую кнопку, не делая что-то вроде width: 150%
р>
.explore__column,
.explore__row {
display: flex;
}
.explore__row {
flex-direction: row;
flex: 1 1;
}
.search-box__item {
display: flex;
flex-direction: column;
justify-content: center;
flex: 1 1;
margin-right: 3.75rem!important;
margin-bottom: 3.75rem!important;
width: 0;
border: 1px solid rgba(33, 33, 33, .4);
align-items: center;
border-radius: 5px;
background: transparent;
background: #fff;
cursor: pointer;
}
.search-box__item.search-box__active {
border-top: 2px solid #4f9bc9;
box-shadow: 0 2px 20px 0 rgba(0, 0, 0, .12);
}
.search-box__item {
display: flex;
flex-direction: column;
justify-content: center;
flex: 1 1;
margin-right: 3.75rem!important;
margin-bottom: 3.75rem!important;
width: 0;
border: 1px solid rgba(33, 33, 33, .4);
align-items: center;
border-radius: 5px;
background: transparent;
background: #fff;
cursor: pointer;
}
<div class="explore__row"><button class="search-box__item search-box__active" type="button"><div class="search-box__translate"><svg viewBox="0 0 30 30" style="overflow: visible;"><use xlink:href="#icon-Plan" style="overflow: visible;"></use></svg></div><div class="search-box__fade
"><input type="text" autocomplete="off" class="input__default form-control" placeholder="search Plans"></div><h2>One</h2></button><button class="search-box__item" type="button"><div class="search-box__translate"><svg viewBox="0 0 30 30" style="overflow: visible;"><use xlink:href="#icon-BusinessUnit" style="overflow: visible;"></use></svg></div><div class="search-box__fade"><input type="text" autocomplete="off" class="input__default form-control" placeholder="search Business Units"></div><h2>Two</h2></button>
</div>
1