Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: center horizontally a modal with full heigth

yeisonvelez11 free asked 6 years ago


I want to center a modal horizontally, as long as it occupies 100% of the height of the screen. I do not know what I'm doing wrong.

enter image description here

    <div mdbModal #detallereuniones="mdbModal" class="modal fade" id="reuniones" tabindex="-1" role="dialog"
      aria-labelledby="crearentregable" aria-hidden="true" [config]="{backdrop: true, ignoreBackdropClick: true}">
      <div class="modal-dialog modal-lg modal-full-height" role="document">
        <div class="modal-content ">
        .
        .
        .

Damian Gemza staff answered 6 years ago


Dear yeisonvelez11,

Please add the .mx-auto class to the div with .modal-content class and your modal will be centered horizontally.

Best Regards, Damian


yeisonvelez11 free commented 6 years ago

it not works for me..

<div mdbModal #detallereuniones="mdbModal" class="modal fade" id="reuniones" tabindex="-1" role="dialog"
  aria-labelledby="crearentregable" aria-hidden="true" [config]="{backdrop: true, ignoreBackdropClick: true}">
  <div class="modal-dialog modal-lg modal-full-height" role="document">
    <div class="modal-content mx-auto">

I need full heigth and center horizontally in my modal..

https://i.imgur.com/pjgcBo2.jpg


Arkadiusz Idzikowski staff commented 6 years ago

Please try to overwrite 'modal-full-height' class:

.modal-full-height { left: 0 !important; margin: 0 auto !important; }



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 7.0.0
  • Device: Web
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No