tags:

views:

25

answers:

4

I have a blank div class that is called spacer ... it has a blue background and a width of 100% of the container (the body) ...

What I have found is that the spacer will not DISPLAY unless I toss some character in it. I can color the character blue so it is hidden, but that is so inelegant.

What is the CORRECT way to do this.

A: 

Give it a height.

Otherwise, with no content, it has zero height and is effectively invisible.

Ferdinand Beyer
A: 

Set a specific height on it too.

jtbandes
A: 

add height to the div

<div style="height:10px; width:100%"></div>
anishmarokey
A: 

what about adding &nbsp; inside.

khairil