For a non set width, I added max-width together with
flex wrap and overflow hidden to make sure some of the tabs are visible. However, I don't want the extra space at the end, I want the div to exactly end at the end of the 4th tab in the image above. Is there a CSS only solution you can think of?