S
S
Stanislav2018-03-07 03:00:34
css
Stanislav, 2018-03-07 03:00:34

How to lay out blocks with flexbox?

I don’t understand how to arrange the blocks without changing the html markup
5a9f2b596dafc831357668.png
The markup itself https://jsfiddle.net/jdu1oLqj/

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
remeder, 2018-03-07
@ms-dred

* {
  box-sizing: border-box;
}
.container {
  display: flex;
  flex-wrap: wrap;
  padding: 0 10px;
}
.content,
.content-details,
.sidebar {
  padding: 10px;
}
.content {
  order: -1;
  width: calc(100% - 200px);
  background-color: #DDD;
}

.content-details {
  background-color: orange;
  order: 1;
  width: 100%;
}

.sidebar {
  width: 200px;
  background-color: green;
  order: 0;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question