proper code for table borders? (or DTD for front page?)

  • allgoodpeople
  • Proficient
  • Proficient
  • User avatar
  • Posts: 379
  • Loc: here

Post 3+ Months Ago

I've been working to get my page to pass muster at the HTML validator from w3c. I have one error left, but when i correct the error, it changes the appearance of my page in a manner i don't like.

It involves the color of the border of a table. The code as I have it now is

Code: [ Select ]
<td width="39%" height="1" align="center" style=
      "border-top-style:solid; border-top-width: 1; border-bottom-style:solid; border-bottom-width: 1; border-left-style:solid; border-left-width:1; border-right-style:solid; border-right-width:1"
       bordercolor="#000000">
  1. <td width="39%" height="1" align="center" style=
  2.       "border-top-style:solid; border-top-width: 1; border-bottom-style:solid; border-bottom-width: 1; border-left-style:solid; border-left-width:1; border-right-style:solid; border-right-width:1"
  3.        bordercolor="#000000">


This is from a table with 3 cells (for holding images). Only the center cell should have a border, which should be black. the html validator states that "there is no attribute ‘FOO’ for this element (in this HTML version). You have used an attribute with an element that is defined not to have that attribute. This is most commonly caused by using vendor-specific attributes without setting the document type appropriately."

so, i tried removing the border color attribute in order to remove the error. but this causes the border to dissappear altogether. I'm guessing the bordor color attribute is unique to Front Page (which is what I'm using for the page).

So, does anyone know the proper way to place a border on a table cell, or is there a special DTD for Frontpage that i need to use instead? The page itself is at http://www.markrhodes.us/bob.htm . Thanks for any info you can share.

Mark
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

allgoodpeople wrote:
Code: [ Select ]
<td width="39%" height="1" align="center" style=
      "border-top-style:solid; border-top-width: 1; border-bottom-style:solid; border-bottom-width: 1; border-left-style:solid; border-left-width:1; border-right-style:solid; border-right-width:1"
       bordercolor="#000000">
  1. <td width="39%" height="1" align="center" style=
  2.       "border-top-style:solid; border-top-width: 1; border-bottom-style:solid; border-bottom-width: 1; border-left-style:solid; border-left-width:1; border-right-style:solid; border-right-width:1"
  3.        bordercolor="#000000">




Might be fairly simple. Looks like the hyphen is missing from bordercolor. I believe it should be border-color
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

As an aside, your DTD is truncated (which is normally what WYSIWYG editors like Frontpage do). Although your's will probably do OK as is, the correct doctype is:

Code: [ Select ]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
      "http://www.w3.org/TR/html4/loose.dtd">
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  2.       "http://www.w3.org/TR/html4/loose.dtd">


Here is more detailed info:

http://www.w3.org/TR/REC-html40/loose.dtd
  • allgoodpeople
  • Proficient
  • Proficient
  • User avatar
  • Posts: 379
  • Loc: here

Post 3+ Months Ago

ATNO/TW wrote:
As an aside, your DTD is truncated (which is normally what WYSIWYG editors like Frontpage do). Although your's will probably do OK as is, the correct doctype is:

Code: [ Select ]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
      "http://www.w3.org/TR/html4/loose.dtd">
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  2.       "http://www.w3.org/TR/html4/loose.dtd">


Here is more detailed info:

http://www.w3.org/TR/REC-html40/loose.dtd


actually, i took that DTD from another page an associate made. thanks for the heads up! i'll get the full one up there and see if it works right.

mark
  • allgoodpeople
  • Proficient
  • Proficient
  • User avatar
  • Posts: 379
  • Loc: here

Post 3+ Months Ago

I figured out the issue with the bordercolor attribute, in case anyone is curious. Turns out it belongs in the style attribute as border-color, rather than as an attribute on it's own. So, took a little doing, but ended up getting it fixed. I actually got the table to function alot better in the process as well.

Odd thing with the DTD though. When I put the URL in the DTD, it messes with the appearance of my page. The truncated DTD doesn't effect it, and the HTML validator takes it. So, I guess I'll stick with the truncated version.

And, as a bonus, I FINALLY got the page to validate completely. Golly, what a pain. Good learning experience though. HTML kit was very useful for getting the HTML cleaned up. Too bad they don't have a cross between FrontPage and HTML Kit :D

Mark
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

You must have missed it when I mentioned the border-color above.

ATNO/TW wrote:

Might be fairly simple. Looks like the hyphen is missing from bordercolor. I believe it should be border-color
  • allgoodpeople
  • Proficient
  • Proficient
  • User avatar
  • Posts: 379
  • Loc: here

Post 3+ Months Ago

ATNO/TW wrote:
You must have missed it when I mentioned the border-color above.



no, i saw that, that's what made me start looking at that area a little more closely. i would have had no idea where to even start looking if you hadn't posted that. definitely a big thanks there!! but i was getting an error on each spot where the attribute bordercolor was showing up. it was in the table tag as well as in each td tag. so, i took it completely out of each td tag, and moved it inside the style attribute in the table tag, as well as adding the hyphen and formating it correctly for a style property. in the process, i re-created the table so it made a little more sense for the way i wanted it set up.

mark

Post Information

  • Total Posts in this topic: 7 posts
  • Users browsing this forum: No registered users and 50 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.