I’m trying to create a div in HTML and then in a separate style sheet. I’m giving the instruction to put a background of red on it.
For some reason, nothing is happening. Here is the code
<div id="Box">
<p class="special">Selection:</p>
<br />
<input type='submit' value='Submit' />
</div>
In my css file, I use this command
#Box {
background:red;;
}
For problems like this, use a tool like Firebug to determine what CSS rules are applied to an element (“Inspect Element” in the context menu). The tools will also allow you to see all the errors which happened during page loading (for example if a CSS stylesheet could not be found) and they show all the resources which were loaded plus lots of other useful information.
See here if you are a victim of IE: Is there something like "Firebug for IE" (for debugging JavaScript)?
Chrome already comes with batteries.