html - 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 set background-color black in css code why background appear white in browser?
if add semicolon @ end of background-color: #000000 background-color: #000000;, code work properly.
here fiddle of code:
https://jsfiddle.net/81rfa9bu/
body { background-color: #000000; text-align: center; } #main { width: 1000; height: 600px; background-color: #f1c83e; } <div class="body"> <div id="main"> hi </div> </div>
Comments
Post a Comment