tips (en)‎ > ‎

bootstrap

Bootstrap 3.3.6 Print Styles Set Transparent Background Color and Black Font Color ;-(
Solution steps:
  1. Go to http://getbootstrap.com/customize/
  2. Deselect "Print media styles"
  3. Download your customized compiled bootstrap version
  4. Substitute the following files in your project with the new ones
    1. bootstrap.css
    2. bootstrap.min.css
;-)

Horizontally Centered and FitContents Modal in Bootstrap 3
Via css:

<div class="modal fade" id="ModalClassificacions" tabindex="-1" role="dialog">
        <div class="modal-dialog modal-lg" role="document">
            <div class="modal-content">
                <div class="modal-body">                  
                </div>
            </div>
        </div>
    </div>
</div>

.modal-dialog {
   display: table;
    position: relative;
    display: table;
    overflow-y: auto;
    overflow-x: auto;
    width: auto;
    min-width: 300px;
}

Horizontally and Vertically Centered and FitContents Modal in Bootstrap 4

Via css:

<div class="modal fade" id="ModalClassificacions" tabindex="-1" role="dialog">
        <div class="modal-dialog modal-dialog-centered modal-lg" role="document">
            <div class="modal-content">
                <div class="modal-body">                  
                </div>
            </div>
        </div>
    </div>
</div>


.modal-lg {
    max-width: inherit;
}

.modal-dialog {
    width: fit-content;  
}
Comments