How to vertically align Bootstrap v4 modal dialogs

Update, as of Beta 3, [docs]: Add .modal-dialog-centered to .modal-dialog to vertically center the modal. Original answer: SCSS: .modal-dialog { min-height: calc(100vh – 60px); display: flex; flex-direction: column; justify-content: center; overflow: auto; @media(max-width: 768px) { min-height: calc(100vh – 20px); } } or unprefixed CSS: .modal-dialog { min-height: calc(100vh – 60px); display: flex; flex-direction: column; justify-content: …

Read more

Open bootstrap modal with vue.js 2.0

My code is based on the Michael Tranchida’s answer. Bootstrap 3 html: <div id=”app”> <div v-if=”showModal”> <transition name=”modal”> <div class=”modal-mask”> <div class=”modal-wrapper”> <div class=”modal-dialog”> <div class=”modal-content”> <div class=”modal-header”> <button type=”button” class=”close” @click=”showModal=false”> <span aria-hidden=”true”>&times;</span> </button> <h4 class=”modal-title”>Modal title</h4> </div> <div class=”modal-body”> modal body </div> </div> </div> </div> </div> </transition> </div> <button id=”show-modal” @click=”showModal = true”>Show …

Read more

UIModalPresentationFormSheet resizing view

MyModalViewController *targetController = [[[MyModalViewController alloc] init] autorelease]; targetController.modalPresentationStyle = UIModalPresentationFormSheet; targetController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; [self presentModalViewController:targetController animated:YES]; // it is important to do this after presentModalViewController:animated: targetController.view.superview.bounds = CGRectMake(0, 0, 200, 200);