tables

Discussion in 'HTML' started by KED, Sep 7, 2006.

  1. KED

    KED Guest

    i was wondering how to align a table exactly where you want it on a
    page.

    by that i mean if i want the table in the center, or the left.
    Basically how do i get the table exactly where i want it on the page.
     
    KED, Sep 7, 2006
    #1
    1. Advertising

  2. KED wrote:

    > by that i mean if i want the table in the center, or the left.
    > Basically how do i get the table exactly where i want it on the page.


    Alter the left and right margins in the stylesheet, both auto to centre it,
    one at 0 to align it to that side.

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
     
    David Dorward, Sep 7, 2006
    #2
    1. Advertising

  3. KED wrote:
    > i was wondering how to align a table exactly where you want it on a
    > page.
    >
    > by that i mean if i want the table in the center, or the left.
    > Basically how do i get the table exactly where i want it on the page.
    >


    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
    <html>

    <head>
    <title>Table Alignment</title>
    <style type="text/css">
    table { border: thin solid black; }
    table.left { margin-left: 0; margin-right: auto; }
    table.right { margin-left: auto; margin-right: 0; }
    table.center { margin-left: auto; margin-right: auto; }
    </style>
    </head>

    <body>
    <table class="left"><tr><td>LEFT</td></tr></table>
    <table class="right"><tr><td>RIGHT</td></tr></table>
    <table class="center"><tr><td>CENTER</td></tr></table>
    </body>

    </html>
     
    Harlan Messinger, Sep 7, 2006
    #3
  4. KED

    KED Guest

    thanks for the help. but i am an extreme newbie with this. any more
    help?

    David Dorward wrote:
    > KED wrote:
    >
    > > by that i mean if i want the table in the center, or the left.
    > > Basically how do i get the table exactly where i want it on the page.

    >
    > Alter the left and right margins in the stylesheet, both auto to centre it,
    > one at 0 to align it to that side.
    >
    > --
    > David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    > Home is where the ~/.bashrc is
     
    KED, Sep 7, 2006
    #4
  5. KED wrote:

    > thanks for the help. but i am an extreme newbie with this. any more
    > help?


    In that case, why not consider dropping the (learning of) old-style use
    of tables for layout and move into the 21st century? Use CSS.

    Lots of links to layouts here.
    http://allmyfaqs.net/faq.pl?Tableless_layouts

    Here's a reasonably good tutorial with CSS included:
    http://htmldog.com/

    --
    -bts
    -Motorcycles defy gravity; cars just suck.
     
    Beauregard T. Shagnasty, Sep 7, 2006
    #5
  6. KED

    KED Guest

    greatly appreciated


    Beauregard T. Shagnasty wrote:
    > KED wrote:
    >
    > > thanks for the help. but i am an extreme newbie with this. any more
    > > help?

    >
    > In that case, why not consider dropping the (learning of) old-style use
    > of tables for layout and move into the 21st century? Use CSS.
    >
    > Lots of links to layouts here.
    > http://allmyfaqs.net/faq.pl?Tableless_layouts
    >
    > Here's a reasonably good tutorial with CSS included:
    > http://htmldog.com/
    >
    > --
    > -bts
    > -Motorcycles defy gravity; cars just suck.
     
    KED, Sep 7, 2006
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. suzy

    newbie: tables/layout

    suzy, Jul 27, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    1,027
  2. Lou

    Hash Tables

    Lou, Sep 5, 2003, in forum: ASP .Net
    Replies:
    5
    Views:
    6,495
    Richard Grimes [MVP]
    Sep 29, 2003
  3. Peter Bassett
    Replies:
    3
    Views:
    970
    Augustus
    Aug 15, 2003
  4. Otuatail

    Tables within tables

    Otuatail, Jul 31, 2004, in forum: HTML
    Replies:
    7
    Views:
    522
  5. Chris Brat
    Replies:
    5
    Views:
    726
    =?iso-8859-1?q?Luis_M._Gonz=E1lez?=
    Aug 22, 2006
Loading...

Share This Page