Removing Extra Table Cell

O

OccasionalFlyer

This ought to be basic and obvious but I have created a simple
table that ought to have four headers columns and four table columns
but it has five and I cannot figure out where the fifth one is coming
from. Here's the simple th info:
<BR/>
<table cellpadding="3" cellspacing="0" style="border: 2px solid
#000000">

<th>
<td style="border: 1px solid #000000; width: 25% height: 72px;">
Name
</td>
<td style="border: 1px solid #000000; width: 15% height: 72px;">
Area
</td>
<td style="border: 1px solid #000000; width: 35% height: 72px;">
Specialization
</td>

<td style="border: 1px solid #000000; width: 25% height: 72px;">
Contact Information
</td>
</th>
Why does this produce five columns? You can see it in action at
http://www.ibr-bbr.org/IBR_Positions_Wanted.aspx
I am not feeling very skilled at HTML right now. Thanks for any
suggestions. It's got to be staring me in the face.
 
R

richard

This ought to be basic and obvious but I have created a simple
table that ought to have four headers columns and four table columns
but it has five and I cannot figure out where the fifth one is coming
from. Here's the simple th info:
<BR/>
<table cellpadding="3" cellspacing="0" style="border: 2px solid
#000000">

<th>
<td style="border: 1px solid #000000; width: 25% height: 72px;">
Name
</td>
<td style="border: 1px solid #000000; width: 15% height: 72px;">
Area
</td>
<td style="border: 1px solid #000000; width: 35% height: 72px;">
Specialization
</td>

<td style="border: 1px solid #000000; width: 25% height: 72px;">
Contact Information
</td>
</th>
Why does this produce five columns? You can see it in action at
http://www.ibr-bbr.org/IBR_Positions_Wanted.aspx
I am not feeling very skilled at HTML right now. Thanks for any
suggestions. It's got to be staring me in the face.

Change the <th> to <tr> then use <th> instead of <td> in the first row.
 
D

dorayme

<[email protected]
OccasionalFlyer said:
This ought to be basic and obvious but I have created a simple
table that ought to have four headers columns and four table columns
but it has five and I cannot figure out where the fifth one is coming
from. Here's the simple th info:
<BR/>
<table cellpadding="3" cellspacing="0" style="border: 2px solid
#000000">

<th>
<td style="border: 1px solid #000000; width: 25% height: 72px;">
Name
</td>

You have a few mistakes. Open rows with tr and close them with
/tr, in CSS, you need to put semi-colons after rules if there is
a following rule. And be careful of even bothering with heights
especially, browsers will often ignore such interference.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html;
charset=utf-8">
<title>A table</title>
<style type="text/css" media="screen">
table {border-collapse: collapse;}
th {color: #000; background: #ffc;}
th, td {border: 1px solid; padding: 3px;}
</style>
</head>
<body>
<table>
<tr>
<th>Name</th>
<th>Area</th>
<th>Specialization</th>
<th>Contact Information</th>
</tr>
<tr>
<td>Smith</td>
<td>Big</td>
<td>Sharpshooter</td>
<td>GPO Sydney</td>
</tr>
</table>
</body>
</html>
 
K

Kamron Bennett

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html;
charset=utf-8">
<title>A table</title>
<style type="text/css" media="screen">
table {border-collapse: collapse;}
th {color: #000; background: #ffc;}
th, td {border: 1px solid; padding: 3px;}
</style>
</head>
<body>
<table>
<tr>
<th>Name</th>
<th>Area</th>
<th>Specialization</th>
<th>Contact Information</th>
</tr>
<tr>
<td>Smith</td>
<td>Big</td>
<td>Sharpshooter</td>
<td>GPO Sydney</td>
</tr>
</table>
</body>
</html>


If you notice too that this code (above) is a lot cleaner and devoid of the
extraneous matter in the table code which was what I think got you confused.
 
K

Kamron Bennett

If you notice too that this code (above) is a lot cleaner and devoid of the
extraneous matter in the table code which was what I think got you confused.

Oh, I forgot to put this in my previous post - I love external CSS sheets
That makes the final HTML document size significantly smaller which
helps to reduce page load time (tho that is getting more more
inconsequential due to bandwidth speeds). And it looks way prettier with
less code in the head.

Any naysayers?
 
J

Jonathan N. Little

Kamron Bennett wrote:

<snip>

i-hate-rude-wise-guys/[email protected]

This is "cute" and all, but do you realize that that domain is real?

<http://theysuck.com/>

and registered to
$ whois theysuck.com

Domain Name: THEYSUCK.COM
Registrar: MONIKER

Registrant [588214]:
Jason Onyskiw
PO Box 1764
Edmonton
Alberta
T5J2P1
CA
...

Domain servers in listed order:

NS1.DSREDIRECTION.COM
NS2.DSREDIRECTION.COM

Record created on: 2001-10-02 17:13:43.0
Database last updated on: 2010-10-11 01:00:37.577
Domain Expires on: 2011-10-02 17:13:43.0

Unless you are associated with Jason maybe you should look at BTS's page:

<http://www.fingerlakesbmw.org/main/flmung.php>
 
B

Beauregard T. Shagnasty

Jonathan N. Little wrote:
[to Kamron Bennett]
i-hate-rude-wise-guys/[email protected]

This is "cute" and all, but do you realize that that domain is real?

I mentioned that very fact to him a couple of weeks ago. It seems he
missed my post, or didn't bother to realize what it meant.
In: Message-ID: <[email protected]>
 
D

dorayme

... I love external CSS sheets


Any naysayers?

Well, some are very attractive indeed I agree. But I married a
piece of CSS when I saw it in the head of a document, love at
first sight really. And by association and loyalty I look for
every opportunity to slip in a bit of CSS into the heads of docs.
If I don't, there are *accusations* and black looks from it who
must be obeyed.
 
D

Doug Miller

Umm, but the style sheet still has to load. You don't get any net
decrease in how many characters are transmitted from the server to the
browser.

You do get the convenience in maintenance on the author's side but no
real benefit on the user's side, at least in terms of bytes xmitted.

10 kb original file

Break it into two files, html and css ...

5 kb new html file?
5 kb new css file?

Still 10kb to xmit.

Yes, but if a site has numerous pages that all use the same styles, keeping
the styles in an external sheet means that the style sheet is transmitted only
once (because it's cached by the browser) instead of once with each page.
 
L

Lewis

Oh, I forgot to put this in my previous post - I love external CSS sheets
That makes the final HTML document size significantly smaller which
helps to reduce page load time (tho that is getting more more
inconsequential due to bandwidth speeds). And it looks way prettier with
less code in the head.
Any naysayers?

External style sheet do not reduce the size of the page load as the
external style sheet is still loaded in its entirety.
 
D

dorayme

Lewis said:
External style sheet do not reduce the size of the page load as the
external style sheet is still loaded in its entirety.

If you have two to a thousand or more HTML docs with a link to a
stylesheet, the text of the link in the head of each of the docs
gets loaded. The external sheet needs load only once and be
cached. This is a very much greater saving all over than for each
html doc to repeat the sheet in its head.
 
B

Beauregard T. Shagnasty

Lewis said:
External style sheet do not reduce the size of the page load as the
external style sheet is still loaded in its entirety.

Please see previous post in this thread, about how the style sheet is
loaded (then cached) only for the first page encountered at the site.
Thereafter, "page load" is quicker - HTML only. :)

Naturally the biggest advantage to an external style sheet is the ease
of maintenance.
 
T

Tim Streater

Ed Mullen said:
High speed connection, no need to waste the disk space. Mainly, when
doing Web development I want to make sure page reloads are from online,
not from cache. For example, I edit a page, upload it to the server,
toggle to my browser and hit refresh. I want to be sure it calls the
page anew from the server, not from an outdated cache. Been driven
crazy by that in the past.

:)

I had that just yesterday myself.
 
D

dorayme

Tim Streater said:
:)

I had that just yesterday myself.

Refreshing browser usually gets latest from server in my
experience, arguably better overall than turning off caching. But
ymmv.
 
L

Lewis

In message said:
If you have two to a thousand or more HTML docs with a link to a
stylesheet, the text of the link in the head of each of the docs
gets loaded. The external sheet needs load only once and be
cached. This is a very much greater saving all over than for each
html doc to repeat the sheet in its head.

Assuming someone loads 2,000 pages with identical style sheets and
assuming their browser actually caches them correctly.
 
D

dorayme

Lewis said:
In message said:
Assuming someone loads 2,000 pages with identical style sheets and
assuming their browser actually caches them correctly.

The savings would kick in for many less pages. It is good
practice because it *is* a saving and plus it is good management
for the webmaster.

This is not to say a little correction or override in head styles
is a bad thing for individual pages, it is in fact a very useful
thing to do in addition to one or two main external sheets. But
to repeat a big main style sheet in the head of each page is sort
of not very smart. Even my neighbour's cat would not do it and
her considerable strengths are not exactly intellectual.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top