Background color of webpage | SoloLearn: Learn to code for FREE!


Background color of webpage

I added background color (black) for webpage in body tag using css.This turns the as expexted result that is whole page to black color. But when i did the same after applying bootstrap in html. It does'nt work. So, how can i add a background color after bootstrap is applied ?

12/21/2018 12:46:05 PM


9 Answers

New Answer


Try body { background-color: black !important; }


No its not about this code. I tried for another webpage. When i added bootstrap in it, the background color turns back to white that means the previous code for background color no longer works.


Sujata i don't know bootstrap I'm sorry


You code looks perfect what's wrong in there


Satnam Singh Bgcolor is one of those attributes that has become deprecated.


Keep in mind the order of applying styles (including CSS files). Sure "!important" will add higher priority, but actually, there might be another "!important".


Use the devtools in your browser to see what’s happening. There you might be able to see which element overrules your first background rule.