Re: Replacing tables with divs

Discussion in 'HTML' started by Gus Richter, Mar 8, 2012.

  1. Gus Richter

    Gus Richter Guest

    On 3/7/2012 6:18 PM, Alfred Molon wrote:
    > There is probably a simple answer to this, but for some reason I haven't
    > figured it out yet.
    >
    > 1. How do I replace a table with three columns with an equivalent div-
    > based code?
    >
    > From:
    > <table>
    > <tr><td></td><td></td><td></td></tr>
    > </table>
    >
    > to:
    > <div>
    > <div id="div1"></div><div id="div2"></div><div id="div3"></div>
    > </div>


    <style>
    #div1, #div2, #div3 {float:left;}
    </style>

    <div id="div1"></div><div id="div2"></div><div id="div3"></div>

    > 2. Same question for a table with three rows:
    >
    > From:
    > <table>
    > <tr><td></td></tr>
    > <tr><td></td></tr>
    > <tr><td></td></tr>
    > </table>
    >
    > to an equivalent code with divs.


    <style>
    ----
    </style>

    <div id="div1"></div><div id="div2"></div><div id="div3"></div>

    --
    Gus
     
    Gus Richter, Mar 8, 2012
    #1
    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. rich
    Replies:
    0
    Views:
    734
  2. dorayme

    Re: Replacing tables with divs

    dorayme, Mar 8, 2012, in forum: HTML
    Replies:
    15
    Views:
    671
    dorayme
    Mar 11, 2012
  3. idle
    Replies:
    14
    Views:
    843
    richard
    Mar 9, 2012
  4. richard

    Re: Replacing tables with divs

    richard, Mar 8, 2012, in forum: HTML
    Replies:
    15
    Views:
    784
    Beauregard T. Shagnasty
    Mar 14, 2012
  5. Jukka K. Korpela

    Re: Replacing tables with divs

    Jukka K. Korpela, Mar 8, 2012, in forum: HTML
    Replies:
    3
    Views:
    1,170
    Beauregard T. Shagnasty
    Mar 8, 2012
Loading...

Share This Page