I have a div table. But colspan(beige colored area) doesn't work on desktop view. I think works correctly on mobile view. Do you have an ideas? How can i do that? How can i fix this colspan issue? Thank you for all by now.
<div class="divTable">
<div class="tHead">
<div class="tr">
<div class="th"> </div>
<div class="th">Header 1</div>
<div class="th">Header 2</div>
</div>
</div>
<div class="tBody">
<div class="tr">
<div class="td">Feature 1</div>
<div class="td check colspan">✔</div>
</div>
<div class="tr">
<div class="td">Feature 2</div>
<div class="td remove">x</div>
<div class="td check">✔</div>
</div>
<div class="tr">
<div class="td">Feature 3</div>
<div class="td remove">x</div>
<div class="td remove">x</div>
</div>
<div class="tr">
<div class="td">Feature 4</div>
<div class="td remove">x</div>
<div class="td remove">x</div>
</div>
</div>
<div class="tFooter">
<div class="tr">
<div class="td"> </div>
<div class="td">Footer 1</div>
<div class="td">Footer 2</div>
</div>
</div>
</div>
* {
box-sizing: border-box;
}
.divTable {
display: table;
width: 100%;
}
.tHead {
display: table-header-group;
color: #fff;
background: #009fc8;
font-weight: bold;
font-size: 25px;
}
.tBody {
display: table-row-group;
font-weight: bold;
font-size: 25px;
}
.tFooter {
display: table-footer-group;
color: #fff;
background: #009fc8;
font-weight: bold;
font-size: 25px;
}
.tr {
display: table-row;
font-weight: bold;
font-size: 25px;
}
.td,
.th {
display: table-cell;
padding: 10px;
text-align: center;
font-size: 22px;
word-wrap: break-word;
}
.td {
font-weight: bold;
}
.colspan {
background: beige;
text-align: center;
}
.check {
color: limegreen;
font-size: 30px;
}
.remove {
color: red;
font-size: 30px;
}
.th:first-child,
.td:first-child {
font-weight: bold;
color: black;
}
@media screen and (max-width: 768px) {
.check {
color: limegreen;
font-size: 20px;
}
.remove {
color: red;
font-size: 20px;
}
.tr {
display: flex;
flex-flow: row wrap;
justify-content: space-around;
}
.td,
.th {
display: block;
width: 33.333333333333%;
font-size: 20px;
}
.th:first-child,
.td:first-child {
background: #efefef;
width: 100%;
}
.th:first-child {
display: none;
}
.colspan {
width: 100%;
}
}
https://codepen.io/23ds/pen/wvqmMWY
For STOF: :))
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse...