Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5

Thread: TABLE to DIV

  1. #1
    New Coder
    Join Date
    Oct 2009
    Location
    Rizal Province, Philippines
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    TABLE to DIV

    in my other thread, somebody posted:
    Oh.. NO! Don't you know using tables for layout is very bad?
    i visit the of why-table-is-bad link in that thread and found out that instead of table, tr,td etc, DIV is the proper(?) way.

    i have here a basic and simple example of an html tabled-layout page.

    Code:
    <?xml version="1.0" encoding="iso-8859-1"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    </head>
    
    <body>
    <table width="600" border="0" align="center" cellpadding="10" cellspacing="0">
        <tr> 
            <td colspan="2" bgcolor="#999999"><h1 align="center">HEADING 1</h1></td>
        </tr>
        <tr> 
            <td colspan="2"><table width="519" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr> 
                        <td width="177" height="125" bgcolor="#FFFF66"><center>
                                news</center></td>
                        <td width="196" bgcolor="#FFFF99"><center>
                                welcome</center></td>
                        <td width="96" bgcolor="#FFFFCC"><center>
                                ads</center></td>
                    </tr>
                </table></td>
        </tr>
        <tr> 
            <td width="471" bgcolor="#CCCCFF"><center>
                    Footer</center></td>
            <td width="89" bgcolor="#FFFFCC">Extra Data</td>
        </tr>
    </table>
    </body>
    </html>
    i don't have any idea on how UN-TABLE layout that page keeping it exactly the way it was(including the way it behaves in the browser)

    can somebody help me?

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,624
    Thanks
    6
    Thanked 1,001 Times in 974 Posts
    Looks like a three column layout to me. Have a look at BonRouge.com, it has everything you need.

  • #3
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    You may also find this helpful.

    Also much help here.

    Frank
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.

  • #4
    New Coder
    Join Date
    Oct 2009
    Location
    Rizal Province, Philippines
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanx a lot for the links gentlemen!
    but if somebody have time, may i kindly request the conversion of my code to NON-TABLEd one. for in my experiences, i've learned best from examples

    but i will consider the links for extra knowledge. thanks again guys

  • #5
    New Coder
    Join Date
    Oct 2009
    Location
    Rizal Province, Philippines
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts
    anybody? please ...


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •