Wie kann ich horizontale Spalten mit fester Kopfzeile auf jedem Textblock anordnen? Textblöcke überlappen sich beim Überlauf.Horizontale CSS-Spalten mit fester Kopfzeile
Ich möchte auf diesem Screenshot sehen, wie
Sie sehen das Problem kann bei jsFiddle
oder dies:
p {
margin: 0;
}
.container {
outline: 1px dotted gray;
height: 200px;
width: 400px;
white-space: nowrap;
overflow-x: auto;
}
.column {
outline: 1px dotted green;
display: inline-block;
vertical-align: top;
white-space: normal;
column-width: 100vw;
width: min-content;
min-width: 50%;
height: 100%;
}
.header {
column-span: all;
white-space: nowrap;
}
<div class="container">
<div class="column">
<h2 class="header">Lorem ipsum dolor sit..</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Pariatur, dicta aut a at sunt quasi aspernatur. Ullam porro, consequatur est quo voluptatum atque. Delectus, dicta, saepe? Delectus sapiente officiis soluta maiores voluptatum voluptates culpa. Libero consectetur aliquid temporibus, dignissimos</p>
</div>
<div class="column">
<h2 class="header">Lorem</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aspernatur, explicabo.</p>
</div>
<div class="column">
<h2 class="header">Lorem</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit</p>
</div>
<div class="column">
<h2 class="header">Lorem</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit</p>
</div>
</div>
Oder was das andere tut Weg existiert?
Sie 4 Spalten haben, und sie sind alle auf min-Breite 50% eingestellt, so effektiv Ihre gesamte Mindestbreite beträgt 200% des verfügbaren Platzes. beklagt nicht, dass euer 1-Liter-Becher übergelaufen ist, als ihr versucht habt, 2 Liter hineinzuschütten ... –
Ich weiß nicht, wie viele ich Spalten oder Text habe. Aber ich muss es nacheinander arrangieren. Es ist unmöglich? –