I\'d like to show a div that has a background-color with the height and width set to 100% but no content. Is it possible to do that without putting a inside?
IMHO you should include the nbsp for otherwise empty DIVs if you want them to actually render into something.
On a "theoretical" note .. the browser is not supposed to show anything if there is no content. The entire point of nbsp is to indicate empty space. This is both common sense and (I believe) the standard.
On a practical side .. are you have three choices. One is to leave nbsp off, knowing that you will get unpredictable results. This is likely the easiest to code. Another is to always include nbsp, either by always putting nbsp at the end of the div or testing for empty and adding nbsp if it is empty. The third it to test for the browser and insert nbsp when needed.