Как сверстать макет используя flex?

введите сюда описание изображения

как расставить блоки используя flex css


Ответы (1 шт):

Автор решения: UserTest013

body {
  display: flex;
  flex-direction: column;
  --gap: 1em;
  gap: var(--gap);
}

header,
footer {
  background: #08a6fd;
  height: 50px;
  width: 100%;
}

main {
  display: flex;
  gap: var(--gap);
}

aside {
  background: #00b157;
  height: 100px;
  width: 50px;
}

section {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  flex: 1;
  gap: var(--gap);
}

section *:nth-child(1),
section *:nth-child(2) {
  background: #ff9432;
  flex: 0 0 calc(50% - var(--gap));
}

article {
  background: #c4c4c4;
  flex: 1;
  min-width: var(--gap);
}
<header></header>
<main>
  <aside></aside>
  <section>
    <article></article>
    <article></article>
    <article></article>
    <article></article>
    <article></article>
  </section>
  <aside></aside>
</main>
<footer></footer>

→ Ссылка