2
I have three divs next to each other, but I’ve defined that the middle div (espaco-contato)
has a defined minimum width, however, that the lateral Ivds remain responsive.
What is happening is that by reaching the minimum width defined in the middle DIV (espaco-contato)
, the one on the right-hand side (espaco-interacao)
line break and then the DIV (espaco-contato)
also line quabra. I need the three DIV s to keep reducing their widths without line breaking.
Follow the link to check: https://jsfiddle.net/gladisonperosini/3bohLt7r/4/
How to solve?
Follows the CSS:
header{
width: 100%;
max-width: 1550px;
margin: auto;
background-color: #eee;
padding: 5px;
box-sizing: border-box;
overflow: auto;
}
header div.espaco-logo{
float: left;
width: calc(100% / 3);
height: 130px;
background-color: #222;
}
header div.espaco-contato{
float: left;
width: calc(100% / 3);
min-width: 450px;
height: 130px;
background-color: #ccc;
}
header div.espaco-interacao{
float: left;
width: calc(100% / 3);
height: 130px;
background-color: #222;
}
HTML
<header>
<div class="espaco-logo"></div>
<div class="espaco-contato"></div>
<div class="espaco-interacao"></div>
</header>
put an example working with the problem, just observe the static code becomes more difficult to help
– Ricardo Pontual
@Ricardopunctual Hello, follow the link https://jsfiddle.net/gladisonperosini/3bohLt7r/4/
– Gladison
Put display: Flex, in the header you should solve
– hugocsl
@hugocsl Did not solve!
– Gladison
Gladison, as @hugocsl commented put a
display:flex;
resolve. (I also removed the floats, which I no longer need) For example: https://jsfiddle.net/0boad2kt/– Andrew Ribeiro