Why? What are you trying to achieve that the current code doesn’t do?
If it’s for browser compatibility you can use inline-block on the <li>s. Not sure what the purpose of the “Audio Player” text is inside the center <a> element but you will have to remove it or fix the <a>, one option is to use display: table; on it.
.wrape .nav {
margin: 0;
padding: 0;
list-style: none;
/* remove white space */
font-size: 0;
}
.wrape .nav li {
margin: 0;
padding: 0;
background: blue;
/* set li to inline-block so they wrap */
display: inline-block;
}
.wrape .nav li:nth-of-type(8) a {
opacity: 0;
border: none;
background: none;
/* fix for text inside the a element */
display: table;
}
I’m guessing you would write it a bit like a HTML table and give each row of li(s) a container and set it to display: table-row, then set each li to display: table-cell;. It will require both restructuring the HTML and CSS. All the :nth-of-type will need to be fixed and you can’t use the same ul/li structure like you are now.
Hello there,
I have a similar problem, I’m trying to wrap the table cells to the next row on a smaller screen but I’m kinda abstruse. Please correct me if I’m wrong, if anything is getting overflowed, it’s the table row right? So defining tr { overflow -x: auto;} should work right? It’s not working for me. I’m trying to bring the cells in the next row in this