Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change bootstrap modal header colors (backgrond & text)

How could I change the bootstrap modal header background to dark-blue and the text to white. Fiddle is here :

https://www.bootply.com/kzdpQurfsl

like image 569
Radika Moonesinghe Avatar asked Oct 24 '25 00:10

Radika Moonesinghe


2 Answers

You can try to use the following CSS:

.modal-header {
  background-color: darkblue;
  color: white;
}

Fiddle is here.

like image 166
Joe1615 Avatar answered Oct 25 '25 16:10

Joe1615


Rather than changing the colours of all the modals why not add this to an extension CSS file.

.modal-header.primary {
  color: #fff;
  background-color: #337ab7;
  border-color: #337ab7;
}

and then add primary to your modal-header thus:

<div class="modal-header primary">

Fiddle is here...

like image 34
Simon Avatar answered Oct 25 '25 16:10

Simon