bootstrap

Bootstrap 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

;-)

This may happen when printing an asp.net gridview with colored rows when class contains bootstrap's "table" style.

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;

}

Proper Brn Style with FontAwesome Fas

Incorrect:

<button type="button" class="btn fas fa-plus-circle"> </button>

Correct:

<button type="button" class="btn"> <i class="fas fa-plus-circle"></i> </button>