Table alignment

Discussion in 'HTML' started by OccasionalFlyer, Jul 30, 2011.

  1. In trying to improve what someone else put on www.ibr-bbr.org about
    IBR's annual meeting next November (near the bottom of the page), I
    have tried to put the content into multiple tables. (I don't claim to
    be a web designer, so there may be better ways to do this, and I
    readily accept suggestions.)
    I have three main tables, with the first table containing two tables.
    I have two questions.
    1. The <th> of the first table, which says "Nov. 18- Friday" has a
    colspan="3" in it but it is not spanning three columns. What do I need
    to do to make a <th> span all three columns that the inner tables
    have?

    2. The second main table, which starts with
    <table border="1">
    <tr>
    <th colspan="3">
    Nov. 19 Saturday 8:30 A.M.-12:30 P.M. IBR Morning Session
    </th>
    </tr>

    is much wider than the table above it. How do I get all the tables in
    this section to align the same, all with the same left margin as the
    image above it?

    Thanks.

    Ken
     
    OccasionalFlyer, Jul 30, 2011
    #1
    1. Advertising

  2. OccasionalFlyer

    Andy Guest

    "OccasionalFlyer" <> wrote in message
    news:...
    > In trying to improve what someone else put on www.ibr-bbr.org about
    > IBR's annual meeting next November (near the bottom of the page), I
    > have tried to put the content into multiple tables. (I don't claim to
    > be a web designer, so there may be better ways to do this, and I
    > readily accept suggestions.)
    > I have three main tables, with the first table containing two tables.
    > I have two questions.
    > 1. The <th> of the first table, which says "Nov. 18- Friday" has a
    > colspan="3" in it but it is not spanning three columns. What do I need
    > to do to make a <th> span all three columns that the inner tables
    > have?
    >
    > 2. The second main table, which starts with
    > <table border="1">
    > <tr>
    > <th colspan="3">
    > Nov. 19 Saturday 8:30 A.M.-12:30 P.M. IBR Morning Session
    > </th>
    > </tr>
    >
    > is much wider than the table above it. How do I get all the tables in
    > this section to align the same, all with the same left margin as the
    > image above it?
    >
    > Thanks.
    >
    > Ken
    >



    Hi Ken,

    I've done a quick&dirty update to the page...

    http://homepage.ntlworld.com/andy.j.bailey/example.html

    ....just copy the source code and upload to your server.


    Andy
     
    Andy, Jul 30, 2011
    #2
    1. Advertising

  3. OccasionalFlyer

    richard Guest

    On Fri, 29 Jul 2011 21:39:15 -0700 (PDT), OccasionalFlyer wrote:

    > In trying to improve what someone else put on www.ibr-bbr.org about
    > IBR's annual meeting next November (near the bottom of the page), I
    > have tried to put the content into multiple tables. (I don't claim to
    > be a web designer, so there may be better ways to do this, and I
    > readily accept suggestions.)
    > I have three main tables, with the first table containing two tables.
    > I have two questions.
    > 1. The <th> of the first table, which says "Nov. 18- Friday" has a
    > colspan="3" in it but it is not spanning three columns. What do I need
    > to do to make a <th> span all three columns that the inner tables
    > have?
    >
    > 2. The second main table, which starts with
    > <table border="1">
    > <tr>
    > <th colspan="3">
    > Nov. 19 Saturday 8:30 A.M.-12:30 P.M. IBR Morning Session
    > </th>
    > </tr>
    >
    > is much wider than the table above it. How do I get all the tables in
    > this section to align the same, all with the same left margin as the
    > image above it?
    >
    > Thanks.
    >
    > Ken


    First, clean up your errors by going here
    http://validator.w3.org/

    <table><tr><th>data</th></tr></table>
    Should be simply <table><th>data</th></table>

    IMO, create one table instead of 3.
    Left most column then will be the date.

    The colspan does not span 3 columns because of the leading <tr>.
    <th> is a row tag which is acted upon differently.
     
    richard, Jul 30, 2011
    #3
  4. richard wrote:

    > <table><tr><th>data</th></tr></table>
    > Should be simply<table><th>data</th></table>


    No richard this is absolutely incorrect. TH and TD elements must be
    contained by TR elements.

    "<!ELEMENT TR - O (TH|TD)+ -- table row -->"

    <http://www.w3.org/TR/html401/struct/tables.html#edef-TR>

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Jul 30, 2011
    #4
  5. OccasionalFlyer

    richard Guest

    On Sat, 30 Jul 2011 10:45:14 -0400, Jonathan N. Little wrote:

    > richard wrote:
    >
    >> <table><tr><th>data</th></tr></table>
    >> Should be simply<table><th>data</th></table>

    >
    > No richard this is absolutely incorrect. TH and TD elements must be
    > contained by TR elements.
    >
    > "<!ELEMENT TR - O (TH|TD)+ -- table row -->"
    >
    > <http://www.w3.org/TR/html401/struct/tables.html#edef-TR>


    You are correct.
    It's been awhile since I've actually worked with Th so I had forgotten that
    it was necessary to include the th in a tr.
     
    richard, Jul 30, 2011
    #5
  6. OccasionalFlyer

    xx x Guest

    Will email you the code.
    Your culprit is

    <td colspan="3">10 am</td>

    which would span your time over 3 columns.
     
    xx x, Jul 31, 2011
    #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. Tomba

    table alignment prob

    Tomba, Nov 15, 2003, in forum: HTML
    Replies:
    0
    Views:
    386
    Tomba
    Nov 15, 2003
  2. M
    Replies:
    1
    Views:
    429
    Sid Ismail
    Jul 3, 2004
  3. Mike T.

    Table alignment

    Mike T., Aug 27, 2004, in forum: HTML
    Replies:
    2
    Views:
    424
  4. Max

    table alignment

    Max, Jan 4, 2005, in forum: HTML
    Replies:
    5
    Views:
    481
    Sid Ismail
    Jan 5, 2005
  5. tolobe

    table alignment

    tolobe, Nov 3, 2007, in forum: HTML
    Replies:
    3
    Views:
    397
    Martin Jay
    Nov 4, 2007
Loading...

Share This Page