+ 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 ?

21st Dec 2018, 12:46 PM
Suzan
Suzan - avatar
7 Antworten
+ 5
Try body { background-color: black !important; }
21st Dec 2018, 1:12 PM
Calviղ
Calviղ - avatar
+ 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.
21st Dec 2018, 1:07 PM
Suzan
Suzan - avatar
+ 4
Sujata i don't know bootstrap I'm sorry
21st Dec 2018, 1:09 PM
UwU Discover Me
+ 3
You code looks perfect what's wrong in there https://code.sololearn.com/W3A148afbueK/?ref=app
21st Dec 2018, 1:04 PM
UwU Discover Me
+ 3
Satnam Singh Bgcolor is one of those attributes that has become deprecated.
21st Dec 2018, 2:08 PM
Calviղ
Calviղ - avatar
+ 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".
21st Dec 2018, 10:35 PM
Jakub Dubański
Jakub Dubański - avatar
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.
23rd Dec 2018, 9:13 AM
marjel101
marjel101 - avatar