I
I
Igor Makhov2020-04-27 16:12:04
css
Igor Makhov, 2020-04-27 16:12:04

How to make the block the correct height?

Tell me how here: https://jsfiddle.net/uw23s0vL/ to make block c be stretched to the size of the parent element, and not crawl out of the border?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Sharomet, 2020-04-27
@Igorgro

*, ::after, ::before {
    box-sizing: border-box;
}
div{
  padding:16px;
}
#a {
  border: 1px solid red;
  height:200px;
  display: flex;
  flex-direction: column;
}
#b {
  border: 1px solid green;
}
#c {
  border: 1px solid blue;
  height: 100%;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question