SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru
    Join Date
    Mar 2004
    Posts
    639
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to create such table?

    Hello,

    You know that when you use simple table layout on your website, table situated not at the very top left corner, but has margin about 5-10 pixels.

    I wonder how to create table layout which will start at the top left corner without any spaces?

  2. #2
    SitePoint Evangelist
    Join Date
    Apr 2009
    Location
    South Carolina
    Posts
    458
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could use CSS to remove the margins for the table and the padding for what contains the table. If all you have is a body and table for your site, you can set body margin and padding to zero and see if that does what you want.

    Before you design your site using tables, you should read http://www.webaim.org/techniques/tables/ to help you make sure you want to use tables and if so, how to do that.

  3. #3
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is most likely cause by the default margin or padding on the body element.

    Set all margins and paddings involved to zero to remove it:
    Code CSS:
    html, body, table {margin:0; padding:0}
    Birnam wood is come to Dunsinane


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
  •