<div class="grid">
	<div class="grid__heading">
		<h1>Heading</h1>
	</div>
	<div class="grid__media">
	</div>
	<div class="grid__body">
		<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
	</div>
	
</div>

<div class="grid grid--text-bottom">
	<div class="grid__heading">
		<h1>Heading</h1>
	</div>
	<div class="grid__media">
	</div>
	<div class="grid__body">
		<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas purus metus, venenatis egestas diam tempus, venenatis ornare sem. Duis maximus erat eget dui aliquet tempor id nec arcu.</p>
	</div>
</div>

<div class="grid grid--text-bottom">
	<div class="grid__heading">
		<h1>Heading</h1>
	</div>
	<div class="grid__media">
	</div>
	<div class="grid__body">
		<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas purus metus, venenatis egestas diam tempus, venenatis ornare sem. Duis maximus erat eget dui aliquet tempor id nec arcu.</p>
	</div>
</div>

<div class="grid">
	<div class="grid__heading">
		<h1>Heading</h1>
	</div>
	<div class="grid__media">
	</div>
	<div class="grid__body">
		<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas purus metus, venenatis egestas diam tempus, venenatis ornare sem. Duis maximus erat eget dui aliquet tempor id nec arcu.</p>
	</div>
</div>
* {
	box-sizing: border-box;
}

h1, p {
	margin: 0;
}

body {
	padding: 20px;
	background: black;
}

img {
	display: block;
	width: 100%;
}

.grid {
  --noOfColumns: 8;
  --colWidth: 1fr;
  --gutter: 20px;

  @media (min-width: 900px) {
		--colWidth: 30px;
    --noOfColumns: 12;
  }

  @media (min-width: 1200px) {
    --noOfColumns: 24;
  }

  @media (min-width: 1600px) {
    --colWidth: 40px;
		--gutter: 30px;
  }
}

.grid {
	@media (min-width: 700px) {
		display: grid;
		grid-template-columns: 
			[outer-start]
			minmax(20px, 1fr)
			[wrapper-start] 
			repeat(var(--noOfColumns), minmax(0, var(--colWidth)))
			[wrapper-end]
			minmax(20px, 1fr)
			[outer-end];
		grid-template-rows: [text-start] 1fr [media-start] auto [text-end] 40px [heading-start] auto [heading-end] 40px auto [media-end];
		gap: 0 var(--gutter);
	}
	
	border: 2px solid hotPink;
	margin: 0 0 80px 0;
}


.grid--text-bottom {
	grid-template-rows: [media-start] auto 40px
      [heading-start] auto [heading-end] 
      40px [text-start] auto [media-end] 
      1fr [text-end];
	
	.grid__body {
		align-self: flex-end;
	}
}

.grid__heading,
.grid__media {
	grid-column: var(--start) / var(--end);
}

.grid__heading {
	--start: wrapper-start;
	--end: wrapper-end;
	grid-row: heading;
	z-index: 1;
	text-align: center;
	font-size: 2em;
	line-height: 1;
	letter-spacing: 0.06em;
	background-color: #B0BEC5;
	text-transform: uppercase;
	padding: 10px;
	
	@media (min-width: 1200px) {
		--start: 5;
		--end: -5;
	}
}

.grid__media {
	--start: wrapper-start;
	--end: 6;
	
	grid-row: media;
	height: 300px;
	background-color: #78909C;
	
	@media (min-width: 1200px) {
		--end: 15;
		
		height: 400px;
	}
}

.grid__body {
	--span: 4;
	--end: wrapper-end;
	grid-column: span var(--span) / var(--end);
	grid-row: text;
	align-self: flex-start;
	background-color: #607D8B;
	
	@media (min-width: 900px) {
		--span: 5;
	}
	
	@media (min-width: 1200px) {
		--span: 8;
	}
}


.grid:nth-child(2) {
	.grid__media {
		--start: 6;
		--end: outer-end;
		
		@media (min-width: 900px) {
			--start: 9;
		}
		
		@media (min-width: 1200px) {
			--start: 12;
			--end: outer-end;
		}
	}
	
	.grid__body {
		grid-column: wrapper-start / span var(--span);
	}
}

.grid:nth-child(3) {
	.grid__media {
		@media (min-width: 1200px) {
			--start: outer-start;
			--end: 12;
		}
	}
	
	.grid__body {
		--end: -4;
	}
}

.grid:nth-child(4) {
	.grid__media {
		--start: 6;
		--end: wrapper-end;
		
		@media (min-width: 900px) {
			--start: 9;
		}
		
		@media (min-width: 1200px) {
			--start: 16;
		}
	}
	
	.grid__body {
		grid-column: 4 / span var(--span);
	}
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.