As a vertically centered .div in Bootstrap?

As a vertically centered black and yellow .inside the red div? Find in Bootstrap like it's done. You need to writing class? How can this best be done so as not to break anything in Bootstrap (probably have some kind of best practice)?

codepen.io/dhatt/pen/KgzoGx
July 5th 19 at 00:02
2 answers
July 5th 19 at 00:04
Solution
And why put posechenny and top, and add a negative margin-top if with the same success you can simply add only one margin-top: 100px??? - Abbey commented on July 5th 19 at 00:07
: because if I ask the height of the block 600 px then under such conditions, my layout will not go, and yours, with margin-top:100px, go.

codepen.io/cyberbober/pen/dprmAp - Abdul.Stiedemann commented on July 5th 19 at 00:10
: Well, if the block do not have a fixed height, then what? How to automatically center? - Abbey commented on July 5th 19 at 00:13
: I understand what you mean, only I'm not clear where you got margin-top: -100px? Why-100px? - Abbey commented on July 5th 19 at 00:16
: because the height of the block, which I centeroo - 200px) Yes, you can, the ways of vertical centering in css is a special kind of fetish among frontend developers Google and you will find a lot of ways - Abdul.Stiedemann commented on July 5th 19 at 00:19
: hmm, but if the indoor unit no fixed height (for example, there is a text content that can change) - what to do? The most insulting that Flexbox breaks the container. - Abbey commented on July 5th 19 at 00:22
: https://goo.gl/2KIRc6 - Abdul.Stiedemann commented on July 5th 19 at 00:25
OK, I thought to Bootstrap is the best method. Will have to poke at random))) - Abbey commented on July 5th 19 at 00:28
: you should not start working with css using bootstrap, you automatiseret small part of the work, but actually you don't understand, so your css will still not be kosher. Bootstrap is a framework and does not alter other CSS features, and the correctness of those or other actions can be determined only by experience, so do not bother in this case. - Abdul.Stiedemann commented on July 5th 19 at 00:31
: I'm not starting to work with CSS, I continue. Just before I began to impose on Flexbox from all of these flotow and other hacks I'm sick))) - Abbey commented on July 5th 19 at 00:34
July 5th 19 at 00:06
In my opinion vertically through the classes in bootstrap are not aligned. You need to set css .

Find more questions by tags BootstrapCSS