Jump to content
  • 0

Модульная сетка на flex


viliksar
 Share

Question

Используя flex хочу построить сетку с модулями (скрин)

Скрытый текст

0cb52fd32e5069bea35d32b167fff7d5.jpg

пробовал изменять расположения вдоль главной и поперечной оси, не смог добиться расположения как на скрине

код здесь - https://codepen.io/viliksar/pen/dKvZgV?editors=1100

Edited by viliksar
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Размеры сами подставите

<div class="container">
   <div class="column header"></div>
   <div class="row">
      <div class="column column1">1</div>
      <div class="wrap">
        <div class="column column2">2</div>
        <div class="column column3">3</div>
        <div class="column column4">4</div>
      </div>
   </div>
  <div class="column footer"></div>
</div>
.container {
  width: 600px;
  min-height: 230;
}

.column {
  height: 90px;
  padding: 20px;
  border: 1px solid black;
  box-sizing: border-box;
}
.column2{
  width: 100%;
}
.column3, .column4{
  width: 50%;
}
.row {
  display: flex;
  justify-content: space-between;
}
.wrap{
  display: flex;
  flex-wrap:wrap;
}

.header {
  padding: 20px;
  height: 40px;
  margin-bottom: 5px;
}

.footer {
  padding: 5px;
  height: 20px;
  margin-top: 5px;
}

 

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy