Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap 3 modal change

On the bootstrap 3 blog it says: "Modals are way more responsive. We've overhauled the modal code to make it way more responsive on mobile devices. They now scroll the entire viewport instead of having a max-height."

Compare the live demo under http://getbootstrap.com/javascript/#modals-examples and the same under http://getbootstrap.com/2.3.2/javascript.html#modals.

I was sort of disappointed when I saw the v3's effect, as I would rather control the modal's height by myself and display the scrollbar within the modal. Do you really feel it's better? In case you dislike it, how can you change it back to the former style without downgrading the bootstrap?

like image 972
Bryant Zheng Avatar asked Mar 22 '23 08:03

Bryant Zheng


1 Answers

You can still control the height by overriding the .modal-body css

.modal-body {
  height: 200px;
  overflow: auto;
}

Hope this helps.

like image 128
ysrb Avatar answered Apr 05 '23 09:04

ysrb