TRE23able TRE23able - 6 months ago 10
CSS Question

When I set webpage background color to black(#000000) in my CSS file it appears white on web browser, why is this?

body {
background-color: #000000
text-align:center;
}
#main {
width: 1000;
height: 600px;
background-color: #f1c83e;
}


When I set my background-color to black in my CSS code why does my background appear as white in my browser?

Answer

Here is a fiddle of your code:

https://jsfiddle.net/81rfa9bu/

If you add a semicolon at the end of background-color: #000000 so that it is background-color: #000000;, your code will work properly.