Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Bootstrap Modal component

Hey everyone!
In Bootstrap the base modal component has something similar to a <hr/> tag to separate the header, body and footer. How can I change its color?
Thank you for your answers!

1 Answer

Steven Parker
Steven Parker
231,264 Points

I believe what you're talking about is just borders on those inner components, which can be styled using the "border-color" attribute. For example, this creates a sky blue modal with purple text:

.modal-header, .modal-body, .modal-footer {
    color: purple;
    border-color: skyblue;  /* color section separators to match background */
    background-color: skyblue;
}

Yes, they are borders. Thank you I didn't think of that.