JSFiddle - React, Tailwind, and code Playground

HTML

<body>

<nav>
    <a href='#'><span>1sdfgsdffghj12334 gsdsg dgfhsfdgfdsgsdf</span></a>
  <a href='#'><span>2</span></a>
  <a href='#'><span>3</span></a>
  <a href='#'><span>4</span></a>
  <a href='#'><p>DasIstWiederEinSehrLangesWort</p></a>
  <a href='#'><span>6</span></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-decoration: none;
    /* vertical center */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

a:hover {
    background: royalblue;
}

nav a span {
    text-align: center;
}


/* Sonstiges */
html {
    background: mintcream;
}

body {
    width: 600px;
    background: palegreen;
}

h1 {
    padding-left: 1ex;
    color: white;
    background: steelblue;
}