JSFiddle - React, Tailwind, and code Playground
by fiedler
HTML
<header>
<img class="linkesbild" src="https://upload.wikimedia.org/wikipedia/commons/d/d4/Waldschaeden_Erzgebirge_2.jpg" alt="Waldschaden Dank an Wikipedia">
<p class="linkertext">Text1</p>
<img class="innenbild" src="https://upload.wikimedia.org/wikipedia/commons/d/d4/Waldschaeden_Erzgebirge_2.jpg" alt="Waldschaden Dank an Wikipedia">
<p class="rechtertext">Text2</p>
<img class="rechtesbild" src="https://upload.wikimedia.org/wikipedia/commons/d/d4/Waldschaeden_Erzgebirge_2.jpg" alt="Waldschaden Dank an Wikipedia">
</header>
CSS
header p {
margin: 0;
text-align: center;
font-size: 1.5rem;
}
header {
display: grid;
grid-template-columns: 1fr auto 1fr;
align-items: center;
gap: 0.5em;
}
header .innenbild {
display: inline-block;
}
header .linkesbild, header .rechtesbild {
display: none;
}
header p.linkertext {
text-align: right;
}
header p.rechtertext {
text-align: left;
}
img {
width: 60px;
max-width: 100%;
}
@media (min-width: 800px) {
header {
grid-template-columns: auto auto auto auto;
}
header .innenbild {
display: none;
}
header .linkesbild, header .rechtesbild {
display: inline-block;
}
}
/* align-items: stretch; KO */
/* align-self: stretch; KO */
/* justify-items: stretch; KO */
/* justify-self: stretch; KO */
/* align-content: stretch; KO */
/* justify-content: stretch; KO */