I would like to ask about the default value of Height for an empty <span> or <div> tag.
from this code:
CSS:
Expand|Select|Wrap|Line Numbers
- div.baselineRule{ background: url(SHipuha.jpg) repeat-x scroll left bottom transparent; display:inline-block; }
Expand|Select|Wrap|Line Numbers
- <div class="baselineRule" style="width:70px"></div>
for the code above,I understand that the image wont be displayed if I don't add:
1. a height value for the CSS. like height="1px"
2. add a content on the div. <div>aaaaa</div>
Is the default height for <DIV> and <SPAN> really 0px?
I just want a clear explanation, about why you should set either of the solutions above for this to work.
Is there a W3C rule or something that would explain why this is happening? Could you please provide me a link?
Any help is greatly appreciated.
Thanks!