<div class="modal">
  <div class="modal__body">
    <h2 class="modal__title">Modal Title</h2>
    <button class="modal__close-button">x</button>
  </div>
</div>
<header>
  <h1 class="header__title">Labzindex</h1>
  <button class="header__call-to-action">call us</button>
</header>
<div class="posts-wraper">
  <div class="posts">
    <article class="posts__item">Post 1</article>
    <article class="posts__item">Post 2</article>
    <article class="posts__item">Post 3</article>
    <article class="posts__item">Post 4</article>
  </div>
</div>
html {
  --red: #bc442f;
  --green: #007b7d;
  --green: #007b7d;
  --yellow: #ffc978;
}

body {
  background: var(--yellow);
}

h1 {
  margin: 0;
  color: var(--yellow);
}

body,
html {
  padding: 0;
  margin: 0;
}

header {
  background: var(--red);
  padding: 16px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: space-around;
}
header h1 {
  color: var(--yellow);
}

.header__call-to-action {
  border: none;
  text-transform: uppercase;
  padding: 12px;
  border-radius: 4px;
  color: #f2f2f6;
  font-weight: bold;
  background: var(--green);
}

.modal {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: hsla(0deg, 0%, 0%, 0.42);
}

.modal__body {
  position: relative;
  color: var(--yellow);
  background: var(--green);
  height: 90%;
  max-width: 500px;
  flex: 1;
  margin: 0 auto;
  padding: 16px;
  box-sizing: border-box;
}

.modal__close-button {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 50px;
  border: none;
  height: 50px;
  font-size: 24px;
  border-radius: 100%;
}

.modal__title {
  font-size: 2.25rem;
  margin: 0;
  top: 0;
  left: 16px;
}

.posts {
  display: grid;
  max-width: 600px;
  grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr));
  gap: 20px;
  margin: 30px auto;
  position: relative;
}
.posts__item {
  background: white;
  font-size: 1.5rem;
  height: 150px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/*# sourceMappingURL=index.css.map */
View Compiled
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.