SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    Life is not a malfunction gold trophysilver trophybronze trophy
    TechnoBear's Avatar
    Join Date
    Jun 2011
    Location
    Argyll, Scotland
    Posts
    6,357
    Mentioned
    268 Post(s)
    Tagged
    5 Thread(s)
    We need to see the code that you're using, or a link to your page, to help you work out where the proble, lies.

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,475
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    As TechnoBear said we'd need to see the whole structure but usually you can float tables side by side if needed (and assuming there is room).

  3. #3
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    ... and assuming they should even be tables in the first place...

  4. #4
    Non-Member Max Height's Avatar
    Join Date
    Dec 2011
    Posts
    303
    Mentioned
    6 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by deathshadow60 View Post
    ... and assuming they should even be tables in the first place...
    and who decides whether they should be tables or not? . Certainly not you, I or anyone else

    Although I wouldn't recommend using tables for layout, if someone wants to choose to use tables for layout no-one has the clout to enforce they don't , especially if the html passes the w3c validator.

    @op

    You can float and style tables just like any element. Post your code so we can see what is happening.

  5. #5
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,297
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    A very basic starting point would be

    Code:
    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="utf-8">
    <title>Experiment</title>
    <style media="all">
    table {border: 1px solid #000; border-collapse: collapse; float: left;}
    </style>
    </head>
    
    <body>
    	<table>
    	<tr>
    	<td>Name of user1 here</td>
    	<td>salary of user1 here</td>
    	</tr>
    	</table>
    
    	<table>
    	<tr>
    	<td>Name of user2 here</td>
    	<td>salary of user2 here</td>
    	</tr>
    	</table>
    </body>
    
    </html>

  6. #6
    Non-Member Max Height's Avatar
    Join Date
    Dec 2011
    Posts
    303
    Mentioned
    6 Post(s)
    Tagged
    1 Thread(s)
    and if you wanted to left and right justify the tables, you can float: left one table and float:right the other table.

  7. #7
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    I would question these being tables, since tables are data that fits into rows AND columns -- you seem to be using multiple tables to do multiple lists... possibly a set of nested lists from a semantic standpoint.

    If it WERE to be a table (assuming there's enough data to warrant it) I would at the very least make the name field be a TH, so there's a topic for each row. It also comes down to how many of these are you putting on every page, since you could have float drop and float ride-up issues if they aren't all the same height with the same information.


Tags for this Thread

Bookmarks

Posting Permissions

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