Posted by Jeff on 01/26/08 03:20
plenty900@yahoo.com wrote:
> Hi folks,
>
> Can someone show me how to convert this to div/span format?
>
> <table width=100%>
> <tr>
> <td>
> <table>
> <tr><td width=100>1</td></tr>
> <tr><td>2</td></tr>
> </table>
> </td>
> <td width=200> 3 </td>
> </tr>
> </table>
>
Styles shown inline, you'll want to put them in your stylesheet instead.
<div style="float: left;width: 100px">
<div>1</div>
<div>2</div>
</div>
<div style="float: left;width: 200px;">3</div>
There's other ways of doing that.
> Is there a good tutorial on how to convert a table-based
> layout to DIVs and SPANs?
Doesn't appear to be. There's lots of bits and pieces here and
there. The biggest problem is doing the equivalent of equal height
columns. You'll see some resources on this though as techniques are
being worked out. Search the archives and you'll find several different
ways of doing that.
Note that all a div is, is an empty block level element, and all a
span is, is an empty inline element. It's how you style them that makes
the difference.
Jeff
>
> Thanks.
[Back to original message]
|