Help with HTML code

Discussion in 'Programming' started by Geraldm, Feb 17, 2008.

  1. #1
    Hiya,

    I'm going crazy, there is something very simply I'm probably missing, but for the life of me, I cannot work it out! :(

    Here is a some test code:
    <html>
    <head></head>
    <body>
    <table align="left" width="200">
    <tr><td><p>test1</p></td></tr>
    </table>
    <table align="left" width="200">
    <tr><td><p>test2</p></td></tr>
    </table>
    </body>
    </html>
    Code (markup):
    What this does is create a webpage with the following output:

    But what I am trying to do is get table1 to be displayed under table2, not beside, ie:

    How can I do this without putting both tables in another table?

    Thanks for your help! :)

    Cheers ...
    Gerald.
     
    Geraldm, Feb 17, 2008 IP
  2. Anduril66

    Anduril66 Well-Known Member

    Messages:
    390
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    108
    #2
    Remove the align="left" from the first table because it makes the table left of the following element.
     
    Anduril66, Feb 17, 2008 IP
    Geraldm likes this.
  3. Geraldm

    Geraldm Well-Known Member

    Messages:
    1,330
    Likes Received:
    97
    Best Answers:
    0
    Trophy Points:
    115
    #3
    See, I knew there was a simple answer!!! ;)
    Thanks heaps Anduril66!! Green rep coming your way!
     
    Geraldm, Feb 18, 2008 IP