Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Table alignment

Reply
Thread Tools

Table alignment

 
 
OccasionalFlyer
Guest
Posts: n/a
 
      07-30-2011
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
 
Reply With Quote
 
 
 
 
Andy
Guest
Posts: n/a
 
      07-30-2011


"OccasionalFlyer" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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

 
Reply With Quote
 
 
 
 
richard
Guest
Posts: n/a
 
      07-30-2011
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.
 
Reply With Quote
 
Jonathan N. Little
Guest
Posts: n/a
 
      07-30-2011
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
 
Reply With Quote
 
richard
Guest
Posts: n/a
 
      07-30-2011
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.
 
Reply With Quote
 
xx x
Guest
Posts: n/a
 
      07-31-2011
Will email you the code.
Your culprit is

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

which would span your time over 3 columns.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
table alignment tolobe HTML 3 11-04-2007 02:17 AM
table alignment Max HTML 5 01-05-2005 10:55 AM
Table alignment Mike T. HTML 2 08-27-2004 07:20 PM
alignment without table M HTML 1 07-03-2004 05:23 PM
table alignment prob Tomba HTML 0 11-15-2003 11:11 AM



Advertisments