I'm trying to make a simple blog layout using CSS Grid. The code is adding a 6px space at the bottom of the div holding the leading image in the post. I cannot eliminate this gap unless I explicitly size the row, which breaks the responsiveness of the site. The image file in the div is sized at 1140x760px.
CSS:
.post {
display: grid;
grid-gap: 5px;
grid-template-areas:
"hero hero"
"article sidebar";
grid-template-columns: 4fr 1fr;
grid-template-rows: 1fr 1fr;
}
.post > div > img {
width: 100%;
}
#hero {
grid-area: hero;
}
#article {
grid-area: article;
}
#sidebar {
grid-area: sidebar;
}
HTML
<div class="post">
<div id="hero">
<img src="/images/{{ page.hero }}.jpg">
</div>
<div id="article">
<h2>{{ page.title }}</h2>
{{ page.content }}
</div>
<div id="sidebar">
{% include sidebar.html %}
</div>
</div>