-1
Goal: Create multiple dynamic columns of li
s, but the first child has to have the width
of 100%
.
Problem: The first child is breaking all the columns of li
s
----------------------------------------
FILHO 1
----------------------------------------
FILHO 2 | FILHO 7 | FILHO 12
FILHO 3 | FILHO 8 | FILHO 13
FILHO 4 | FILHO 9 | FILHO 14
FILHO 5 | FILHO 10 | FILHO 15
FILHO 6 | FILHO 11 | FILHO 16
----------------------------------------
.pai {
border: 1px solid red;
height: 200px;
min-width: 455px;
max-width: 100%;
display: flex;
flex-direction: column;
flex-wrap: wrap;
list-style: none;
}
.pai .filho {
width: 100%;
margin-bottom: 5px;
}
pai li {
height: 50px;
box-sizing: border-box;
width: 225px;
text-align: left;
margin: 0;
height: auto;
}
<ul class="pai">
<li class="filho"><a>teste1</a></li>
<li><a>teste2</a></li>
<li><a>teste3</a></li>
<li><a>teste4</a></li>
<li><a>teste5</a></li>
<li><a>teste6</a></li>
<li><a>teste7</a></li>
<li><a>teste9</a></li>
<li><a>teste10</a></li>
<li><a>teste11</a></li>
<li><a>teste12</a></li>
<li><a>teste13</a></li>
<li><a>teste14</a></li>
<li><a>teste15</a></li>
<li><a>teste16</a></li>
</ul>
This size you cite is the width? And the items are already below the others, in case you meant the columns? , the forum is in Portuguese but if you are quoting properties is better not translate
– ruansenadev
Hello, thanks for the mess, so the size refers to the width of the parent. Regarding the layout I need the Lis to group in dynamic columns, but the first-Hild "son" has to follow the width of all the Lis columns formed horizontally, in the format of the drawing I created above,
– Caio Willian