Side by Side Tables

Something wrong with it? Got an idea for it? Post here.

Moderator: Lucifer

Post Reply
User avatar
INW
Reverse Outside Corner Grinder
Posts: 1950
Joined: Tue Jul 07, 2009 4:10 pm
Location: Charlotte, NC, USA

Side by Side Tables

Post by INW »

I have created some tables on my wiki user page with the old fasion <table> tags.
I know I can make a simpler one with the ladle timestamp as an example but I refuse!

No matter the way I use to create the table, is there a way I can set two tables side by side?

If you go to my user page, you will see 3 tables. Is there a way I can arrange the "Team Lost To" table to the right side of the "Teams Beat" table?
If so, how?

I can't just set the two tables in a <body> and separate them because I have a third table by itself above the 2.
User avatar
dlh
Formerly That OS X Guy
Posts: 2035
Joined: Fri Jan 02, 2004 12:05 am
Contact:

Re: Side by Side Tables

Post by dlh »

You can add a style attribute to the first table: <table ... style="float: left;"> [...] </table>. However, if the page isn't wide enough, then the tables will not be side by side

The optimal (and sometimes discouraged) method: use more tables:

Code: Select all

<table>
    <tr>
        <td>
            <!-- first table -->
            <table>[...]</table>
        </td>
        <td>
            <!-- second table -->
            <table>[...]</table>
        </td>
    </tr>
</table>
User avatar
INW
Reverse Outside Corner Grinder
Posts: 1950
Joined: Tue Jul 07, 2009 4:10 pm
Location: Charlotte, NC, USA

Re: Side by Side Tables

Post by INW »

It works to perfection. Thank you!
User avatar
Zimblunk
Average Program
Posts: 55
Joined: Mon Sep 27, 2010 7:41 pm
Location: USA

Re: Side by Side Tables

Post by Zimblunk »

@dlh: Why is that second option "sometimes discouraged"? I ask because that's the solution I came up with when reading this topic.
User avatar
Lackadaisical
Shutout Match Winner
Posts: 823
Joined: Sun Dec 21, 2003 4:58 pm
Location: Amsterdam, Netherlands
Contact:

Re: Side by Side Tables

Post by Lackadaisical »

Tables are for tabular data, not for layout purposes.

That said, I would just combine the two tables into one (which would also make it clearer to see something like 'i played R 2 times, winning half the time).
Post Reply