I have this markup
<main>
<section class="download">
<img src="media/icon.svg" alt="TOX chat icon" width="345" height="280">
<div class="download_desc">
<h1>A New Kind of Instant Messaging</h1>
<p>
Whether it's corporations or governments, digital surveillance today is widespread. Tox is easy-to-use software that connects
you with friends and family without anyone else listening in. While other big-name services require you to pay
for features, Tox is completely free and comes without advertising — forever.
</p>
</div>
</section>
and CSS applied:
main {
display: grid;
grid-template-rows: 750px 500px 815px 815px 180px;
grid-template-columns: repeat(6, 1fr);
}
.download {
background-color: #414141;
color: white;
}
.download_desc {
grid-column: 2/6;
}
For some reason, grid-column at this case doesn't work at all.
div
with download_desc
class is still in the first column, not from 2nd to 6th as I wanted.
It works if i apply it directly to the .download
class, but not it's children.
Why?