SPAN vs DIV (inline-block)
Posted
by blackjid
on Stack Overflow
See other posts from Stack Overflow
or by blackjid
Published on 2009-10-23T02:06:28Z
Indexed on
2010/05/02
0:17 UTC
Read the original article
Hit count: 251
Hi,
Is there any reason to use a <div style="display:inline-block">
instead of a <span>
to layout a webpage?
Can I put content nested inside the span? What is valid and what isn't?
Thanks!
It's ok to use this to make a 3x2 table like layout?
<div>
<span> content1(divs,p, spans, etc) </span>
<span> content2(divs,p, spans, etc) </span>
<span> content3(divs,p, spans, etc) </span>
</div>
<div>
<span> content4(divs,p, spans, etc) </span>
<span> content5(divs,p, spans, etc) </span>
<span> content6(divs,p, spans, etc) </span>
</div>
© Stack Overflow or respective owner