JSFiddle - React, Tailwind, and code Playground
HTML
<body>
<nav>
<a href='#'>1sdfgsdffghj12334 gsdsg dgfhsfdgfdsgsdf</a>
<a href='#'>2</a>
<a href='#'>3</a>
<a href='#'>4</a>
<a href='#'>DasIstWiederEinSehrLangesWort</a>
<a href='#'>6</a>
</nav>
<h1>Ăśberschrift</h1>
</body>
CSS
/* Flex Container */
nav {
padding: 0;
margin: 0;
list-style: none;
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-flex-flow: row wrap;
}
/* Flex Items */
a {
background: tomato;
padding: 5px;
width: 100%;
margin-top: 10px;
color: white;
font-weight: bold;
font-size: 1em;
text-align: center;
text-decoration: none;
vertical-align: middle; /* hat keinen Effekt */
}
a:hover {
background: royalblue;
}
/* Sonstiges */
html {
background: mintcream;
}
body {
width: 600px;
background: palegreen;
}
h1 {
padding-left: 1ex;
color: white;
background: steelblue;
}