www.webdeveloper.com
Results 1 to 8 of 8

Thread: Positioning tables using CSS

  1. #1
    Join Date
    Jan 2011
    Posts
    34

    Positioning tables using CSS

    Hello All,

    If I want to position 3 separate tables on a web page how can I do that using CSS? I'm going back and forth on using objects or tables and I want to see which one will work the best for me. For now I would like to know how to position these tables using CSS. Any insight would be great!

  2. #2
    Join Date
    Aug 2006
    Posts
    1,886
    Same as positioning anything else... primarily use the box model (http://www.w3.org/TR/CSS2/box.html) for positioning, then use relative and then absolute positioning if absolutely necessary.

    Dave

  3. #3
    Join Date
    Jan 2011
    Posts
    34
    Thank you Dave!

    I have a followup question. If I position the tables "absolute" using pixel value locations won't I have problems with different resolutions for different visitor screens? How do I keep the tables where I want them consistently with a wide variety of screen resolutions?

    This is an example of how I'm locating the tables.

    .atable
    {
    border:0px;
    position:absolute;
    left:1100px;
    top:350px;
    height:150px;
    width:150px;
    }



    Kenneth

  4. #4
    Join Date
    Aug 2006
    Posts
    1,886
    Yes, if you position absolutely you will have problems with different screen resolutions. That's one reason I list that above as the last priority "if you absolutely must" option. To handle different size page widths, you should probably be looking into box model positioning with major elements (like these tables) positioned as a percentage of the page width. Then as you get down to phone-sized pages, you should use CSS media queries to re-position your tables, maybe all one beneath the other rather than next to each other.

    Dave

  5. #5
    Join Date
    Jan 2011
    Posts
    34
    Thank you once again Dave. I want to make these tables a link as well. Have you done that before?

    Kenneth

  6. #6
    Join Date
    Apr 2012
    Posts
    8
    how do you want to link the tables?
    is how to link one table with the other table ?

  7. #7
    Join Date
    Oct 2012
    Posts
    13
    Thnks all for your wonderful suggestions

  8. #8
    Join Date
    Jan 2011
    Posts
    34
    Quote Originally Posted by legend@12 View Post
    how do you want to link the tables?
    is how to link one table with the other table ?
    Each table will be a link to another page of the website.

    Kenneth
    Last edited by KBear; 10-27-2012 at 02:33 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles