Is it possible to make the materialize.css modal larger and remove the vertical scroll bar?

风格不统一 提交于 2019-12-03 07:21:44

yes, what you demand can be easily set.

To increase the width of the modal, just adjust the width of the .modal class

.modal { width: 75% !important  }  /* increase the width as per you desire */

To increase the height of the modal, increase the max-height of the .modal class, like so

.modal { width: 75% !important ; max-height: 100% !important } /* increase the width and height! */

To prevent scrolling of the modal, just add the property overflow-y:hidden to the modal class, like so

.modal { width: 75% !important ; max-height: 100% !important ; overflow-y: hidden !important ;}  /* increase the width, height and prevent vertical scroll! However, i don't recommend this, its better to turn on vertical scrolling. */

For more customisability, you should put this as a custom css in a separate css sheet like mycustomstyles.css and load this as the last stylesheet in your header.

Here's the codepen - https://codepen.io/anon/pen/LGxeOa

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!