So, I searched the Internet and found problems that are a bit similar, but not exactly the same.
I have a list that I want to show in the form of a table, and I want to use the entire width of the parent DIV in (so 100%). I want to show 4 elements in a row and use something like thias:
ul.li{
list-style-type: none;
float: left;
display: box;
border: 1px solid black;
margin: 5px;
padding: 10px;
width: 25%
}
You don’t have to be a mathematician to see what’s wrong here: 25% * 4 - 100, but plus border and margin, the total amount exceeds 100. Thus, the result is only 3 list items per line, and a lot under the total width of the parent div
I tried using a table instead of list items, it’s a little easier to get the exact 100 percent width, but it doesn’t work for the rest of my page, since it is not so flexible, it’s just not what I need.
, , () .