Gunnar Bittersmann: flexbox und/oder grid?

Beitrag lesen

@@Tanya

Kann man grids und flexboxes "mischen", d.h. z.B. flexboxes innerhalb von grids?

Ja, sowohl Grid in Flexbox als auch Flexbox in Grid. Oder Grid in Grid. Oder Flexbox in Flexbox.

Je nach Eingabe in einem Formular soll die Ergebnisseite unterschiedliche Überschriften haben.
[…] Der Fall eins (mit grid) findet sich https://jsfiddle.net/w406tpa3/

Da ist keine Überschrift. article sollte aber eine haben.

Oder es sollte gar kein article-Element verwendet werden – das steht nicht für „Artikel“ im Sinne von „Produkt“. Worum geht es da bei dir?

Wenn nun statt
<p>12345</p> ein leeres <p></p> vorhanden ist, steht der Text zwar (fast) links. Wie bekomme ich aber das gap weg?

Dazu brauchst du weder Grid nosh Flexbox. Beispiel mit span statt p (und h2, falls es sich denn um eine Überschrift 2. Ordnung handelt).

😷 LLAP

--
“When I was 5 years old, my mother always told me that happiness was the key to life. When I went to school, they asked me what I wanted to be when I grew up. I wrote down ‘happy.’ They told me I didn’t understand the assignment, and I told them they didn’t understand life.” —John Lennon