Ich habe diese Tabelle unten, das machen, wir scrollbaren horizontal haben möchten, aber ich mag sowohl die erste und die letzte Spalte der Tabelle während Spalten festgelegt werden dazwischen sind scrollbar. Irgendwelche Ideen, wie dies zu erreichen? Ich möchte dies ohne Plugins oder Javascript tun. Mein CSS weiter unten nach dem HTML. Vielen Dank.Wie Tisch blättert horizontal mit festen ersten und letzten Spalten
<div class="gameinfo-score__details">
<div class="gameinfo-score__details_div">
<div class="gameinfo-score__details__table-div">
<table class="gameinfo-score__details__table-div__table">
<tr class="gameinfo-score__details__table-div__table__row">
<th class="gameinfo-score__details__table-div__table__row__head headcol">
</th>
<td class="gameinfo-score__details__table-div__table__row__head"
ng-repeat="scoreHeading in scoreColumns">
{{scoreHeading}}
</td>
<td class="gameinfo-score__details__table-div__table__row__head">
-
</td>
<td class="gameinfo-score__details__table-div__table__row__head headcol2">
-
</td>
</tr>
<tr class="gameinfo-score__details__table-div__table__row">
<th class="gameinfo-score__details__table-div__table__row__data headcol">
<img class="profile-pic" alt="Profile Picture" height="50" width="100">
</th>
<td class="gameinfo-score__details__table-div__table__row__data"
ng-repeat="scoreHeading in scoreColumns">
-
</td>
<td class="gameinfo-score__details__table-div__table__row__data">-</td>
<td class="gameinfo-score__details__table-div__table__row__data headcol2">-</td>
</tr>
<tr class="gameinfo-score__details__table-div__table__row">
<th class="gameinfo-score__details__table-div__table__row__data headcol">
<img class="profile-pic" alt="Profile Picture" height="50" width="100">
</th>
<td class="gameinfo-score__details__table-div__table__row__data"
ng-repeat="scoreHeading in scoreColumns">
-
</td>
<td class="gameinfo-score__details__table-div__table__row__data">-</td>
<td class="gameinfo-score__details__table-div__table__row__data headcol2">-</td>
</tr>
</table>
</div>
</div>
</div>
.gameinfo-score__details{
margin-bottom: 5px;
.gameinfo-score__details_div {
background-color: #999999;
color: #ffffff;
position: relative;
.score__summary-name {
@include flex-grow(1);
margin-top: 5px;
margin-bottom: 5px;
margin-left: 15px;
}
.gameinfo-score__details__table-div {
background-color: #999999;
width: 100%;
overflow-x: scroll;
margin-left: 100px;
overflow-y: visible;
padding: 0;
table {
border-collapse: separate;
border-spacing: 0;
}
td, th {
margin: 0;
white-space: nowrap;
border-top-width: 0px;
}
.headcol {
position: absolute;
left: 0;
}
.headcol2 {
position: absolute;
right: 0;
}
.gameinfo-score__details__table-div__table {
.gameinfo-score__details__table-div__table__row {
border-top: solid 1px #737373;
.gameinfo-score__details__table-div__table__row__head {
height: 24px;
width: 121px;
color: $gray-lighter;
font-size: $font-size-small;
text-align: center;
background-color: #3a3a3a;
&:last-child {
width: 44px;
}
}
.gameinfo-score__details__table-div__table__row__data {
height: 54px;
width: 44px;
background-color: white;
color: black;
font-size: $font-size-xsmall;
text-align: center;
text-transform: initial;
border-right: solid 1px #737373;
border-bottom: solid 1px #737373;
&:first-child {
width: 121px;
}
}
}
}
}
}
}
Gibt es JS oder jQuery in dieser Tabelle? – Sank6
Eigentlich habe ich es herausgefunden. Es stellte sich heraus, dass ich sowohl dem Wrapper als auch der Tabelle eine bestimmte Breite hinzufügen musste. Vielen Dank. – izuuriver
Willkommen, wenn Sie möchten, bitte upvote meine Antwort ... – Sank6