Skip to content

Instantly share code, notes, and snippets.

@codewithbernard
Created December 26, 2021 07:53
Show Gist options
  • Save codewithbernard/6e7a15f2bc66ac6e0b18444f272d1106 to your computer and use it in GitHub Desktop.
Save codewithbernard/6e7a15f2bc66ac6e0b18444f272d1106 to your computer and use it in GitHub Desktop.
.article {
height: 100%;
position: relative;
overflow: hidden;
}
.picture {
object-fit: cover;
width: 100%;
height: 100%;
}
.header {
font-size: 80px;
color: white;
text-align: center;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
height: fit-content;
margin: auto;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment