+ 4
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 ?
7 Antworten
+ 5
Try
body {
background-color: black !important;
}
+ 4
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.
+ 4
Sujata i don't know bootstrap I'm sorry
+ 3
You code looks perfect what's wrong in there
https://code.sololearn.com/W3A148afbueK/?ref=app
+ 3
Satnam Singh Bgcolor is one of those attributes that has become deprecated.
+ 2
Keep in mind the order of applying styles (including CSS files). Sure "!important" will add higher priority, but actually, there might be another "!important".
0
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.