<div style="background-color:black" onmouseover="this.bgColor='white'"> <div style="float:left">hello</div> <div style="float:right">world</div> </div>
Why does the background color not show as black? I cannot set the width and float, is it possible without them?
Check the network tab to make sure Stylesheets/main. css is getting loaded. Check the style inspector to make sure background-color is not being overridden. You might want to include your stylesheet after bootstrap.
You need to make sure that it is showing up first. You may have an error in your code where you do not have the same amount of opening div tags as you do closing div tags, thus it won't actually display your centerBar2 div. Are you sure your image is in the right directory, properly named, etc.?
The default background color of a div is transparent . So if you do not specify the background-color of a div, it will display that of its parent element.
Since the outer div only contains floated divs, it renders with 0 height. Either give it a height or set its overflow to hidden.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With