SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: inner tables

  1. #1
    SitePoint Evangelist Scheisskopf's Avatar
    Join Date
    Nov 2004
    Location
    Southampton, UK
    Posts
    537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    inner tables

    i have a table with nothing in.

    I would like inside this table, to put 4 floating tables equally spaced, to fill the outer table

    i.e.

    top left
    top right
    bottom left
    bottom right

    i would like 20 px padding between these tables.

    how can i do this?

    i have tried, but seem to be screwing my html page up!

    Thankyou.

  2. #2
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You'd have to float TDs within a TR, and that tends to be handled badly by browsers.

    If you have nothing else in the outer table, why are you using a table at all? Why not floating your four data(?) tables within a semantically neutral element like a DIV?

    If you know the width of your floating data(?) tables, just set the width of the outer container to just over the sum of two widths + 20px, and float the tables in the order you listed.

    Set margin-right:20px for the ones you want on the left (or margin-left:20px on the ones on the right).
    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
  •