|
Posted by Lars Eighner on February 21, 2006, 12:27 pm
Please log in for more thread options
In our last episode,
the lovely and talented knoxautoguy
broadcast on comp.infosystems.www.authoring.html:
> I'm a newbie as anybody can readily see, so if anybody has a
> suggestion, please try to put it in kindergarten terms. Of course, if
> this isn't possible, I'll just have to study your answer until I do
> understand it.
This is really a double whammy, so far as I can tell. You have
a table for nontabular material and have not used a table for
the material that is tabular.
> My HTML code is:
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
><html xmlns="http://www.w3.org/1999/xhtml">
><head>
> <script language="JavaScript" type="text/javascript"></script><!--
> The following line referring to robots is put there to keep search
> engines from including
> this page in any searches, so that this page is in essence private.-->
> <meta name="robots" content="noindex,nofollow" />
> <meta content="text/html; charset=ISO-8859-1"
> http-equiv="content-type" />
> <link rel="stylesheet" type="text/css"
> href="CopyOfShopratesInProgress.css" />
> <title>Shop Rates</title>
></head>
><body>
><a id="topofpage"><font color="#ebecf6">x</font></a>
><!-- In the following line, I have made the font color of "x" the same
> as the background color to make it invisible. I had trouble getting the
> "top of page" links to work using home, since it is a link already. -->
> <div id="topsection">
><br />
><table summary="Top section of this page" border="0" width="100%">
> <tbody>
tbody is for the stuff you want to scroll. This is the
stuff you want fixed.
> <tr>
> <td> <a href="default.html"><small>Home</small></a></td>
This not tabular and it doesn't have enough cells.
> </tr>
><!--This is a back and forward button using javascript, but I have
> disabled it in favor of a regular link to the home page.--><!--<input
> value="Back" onclick="history.go(-1)" type="button"></big><big><input
> value="Forward" onclick="history.forward(-1)" type="button"></big>
> --><!--end of back/forward button script -->
> <tr>
> <td><big><big><span class="title">SHOP
> RATES</span></big></big></td>
Ditto
> </tr>
> <tr>
> <td> <small>Jump ahead alphabetically:</small></td>
Ditto
> </tr>
> <tr>
><!-- The following <a href= statements are links to named anchors in
> the page
> so that the user can jump ahead alphabetically. The letters with no
><a href= statements have no anchors to link to.-->
><td><span class="alphabet">A</span>
> B
><a href="#C">C</a>
><a href="#D">D</a>
><a href="#E">E</a>
> F
><a href="#G">G</a>
><a href="#H">H</a>
><a href="#I">I</a>
> J
><a href="#K">K</a>
><a href="#L">L</a>
><a href="#M">M</a>
> N
><a href="#O">O</a>
><a href="#P">P</a>
> Q
><a href="#R">R</a>
><a href="#S">S</a>
><a href="#T">T</a>
> U
><a href="#V">V</a>
> W X Y Z</td>
Ditto in spades
> </tr>
> <tr>
See this row has three cells. Your other rows have one cell.
That doesn't add up. How ever, this finally tabular matter,
although it should be in th instead of td. Forget you ever
heard of big.
> <td><big><big><span class="job">JOB</span></big></big>
> </td>
> <td><span class="code"><big><big>CODE</big></big></span></td>
> <td><span class="price"><big><big>PRICE</big></big></span></td>
> </tr>
> </tbody>
></table>
></div>
Now you close your table, but you start to give the tabular data!
><div id="bottomsection">
><span class="job">
><a name="B">BORE</a>BLOCK FOR SLEEVE </span>
><br />
><span class="code">BBS</span>
><span class="price">$</span>
><span class="comment">SLEEVE AND HONING OF </span>
><span class="comment">SLEEVE ARE EXTRA</span>
That should have been 4 cells in a table row. Your real table should
have four columns Job code price comment.
First: make a draft table that has your tabular data in tabular form.
Put your navigation crap, banner and stuff above the table.
<CRAP>
<Navigation Crap>
<table summary="....">
<caption>something informative</caption>
<thead>
<tr>
<th>Job</th><th>Code</th><th>Price</th><th>Comment</th>
<-- see four cells in every row -->
</tr>
</thead>
<tfoot>
<tr>
<th>Job</th><th>Code</th><th>Price</th><th>Comment</th>
</tr>
</tfoot>
<tbody>
<-- ... your data as: -->
<tr>
<td>Bore Block for Sleeve</td><td>BBS</td><td>etc.</td><td>etc.</td>
</tr>
<-- ... and all the rest of your data rows. -->
</tbody>
</table>
Put your anchors from your navigation crap in and see if
it won't scroll automagically.
Why is this in (alleged) xhtml? Get the 4.01 spec which has
a convenient index of elements and look up every tag before
you use it to find out what they really mean
And PS: no amount of robot.txt and header tags, etc. will make
a page on the World Wide Web private. There is no security in
obscurity. If this data is sensitive in any way, you need to learn
to employ some security measures.
--
Lars Eighner usenet@larseighner.com http://www.larseighner.com/ That was Zen; this is Tao.
|