Is it possible to render empty <div style="width:50%"> </div> with CSS in xHTML strict 1.0 without setting width and height in pixels?

I'd personally go for <div style="min-height:1px;width:50%"></div>. That way any non empty divs will not get unwanted padding as in the other answer.

Obviously, in a separate CSS file it would be div { min-height:1px; width:50% }


Add some padding to the DIV so that even if there is absolutely nothing between the opening and the closing tags, you still see something.

<div style="width:50%; padding:10px;"></div>

Or give it one non-breaking space (&nbsp;)