Monday, 25 July 2016

Align modal window vertically center

Vertically centering Bootstrap modal window

.modal {
  text-align: center;
  padding: 0!important;
}

.modal:before {
  content: '';
  display: inline-block;
  height: 100%;
  vertical-align: middle;
  margin-right: -4px;
}

.modal-dialog {
  display: inline-block;
  text-align: left;
  vertical-align: middle;
}

4 comments:

  1. This comment has been removed by the author.

    ReplyDelete
    Replies
    1. Great Article android based projects

      Java Training in Chennai

      Project Center in Chennai

      Java Training in Chennai

      projects for cse

      The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training

      Delete
  2. Pleasant perusing, I love your substance. This is actually a phenomenal and useful post. Keep it up. Mobilerepairfactory.com.au provides Samsung Repair Services in Sydney. For more Samsung Screen Repair Sydney

    ReplyDelete