Converting tables to DIV & SPAN

Discussion in 'HTML' started by plenty900@yahoo.com, Jan 25, 2008.

  1. Guest

    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>

    Is there a good tutorial on how to convert a table-based
    layout to DIVs and SPANs?

    Thanks.
     
    , Jan 25, 2008
    #1
    1. Advertising

  2. dorayme Guest

    In article
    <
    m>,
    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>
    >
    > Is there a good tutorial on how to convert a table-based
    > layout to DIVs and SPANs?
    >


    No, there are no tutorials on this specifically. Nor could there
    be because it is not one manageable and specific problem. There
    might not be too many manuals on how to rebuild cities all in one
    go and quickly either. <g>

    I suggest you supply a rather more realistic case of a table
    based layout that you have worked on and how you wish something
    to appear to many people.

    If you really want to know how to make a 1 appear on the left, a
    2 underneath and a 3 way to the right, it is not too hard without
    tables.

    <div style="float:left">1<br>2</div>
    <div style="float:right">3</div>

    But how useful will this be to you?

    --
    dorayme
     
    dorayme, Jan 25, 2008
    #2
    1. Advertising

  3. Bergamot Guest

    wrote:
    >
    > Can someone show me how to convert this to div/span format?


    You're asking the wrong question.

    > Is there a good tutorial on how to convert a table-based
    > layout to DIVs and SPANs?


    There's a lot more to it than div and span. Get some understanding of
    semantics and you'll have a much better site. You might start here:
    http://microformats.org/wiki/posh

    --
    Berg
     
    Bergamot, Jan 25, 2008
    #3
  4. Jeff Guest

    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.
     
    Jeff, Jan 26, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sherpaa
    Replies:
    2
    Views:
    4,115
    brucie
    Jun 1, 2004
  2. Fulio Open

    Can span include span?

    Fulio Open, Jun 26, 2009, in forum: HTML
    Replies:
    5
    Views:
    551
    dorayme
    Jun 26, 2009
  3. Stéphane Klein
    Replies:
    2
    Views:
    1,768
    John Nagle
    Mar 30, 2010
  4. Stefan Behnel
    Replies:
    0
    Views:
    489
    Stefan Behnel
    Mar 29, 2010
  5. Dan Bishop

    DataGrid (body only) contained in <span>...</span> tags

    Dan Bishop, Jun 7, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    2
    Views:
    279
    Kilic Beg
    Jun 7, 2004
Loading...

Share This Page