Forum Moderators: open

Message Too Old, No Replies

Validating HTML

attribute errors in 4.01 Traditional

         

keyplyr

11:21 pm on Jul 17, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The page validates without a DOC TYPE using CSE HTML Lite (and others), but I'd like to stabilize IE rendoring (no quirks mode) and validate with W3C.

When I insert:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

W3C Val gives this error... there is no attribute "BACKGROUND"

I have a general idea how to do this with CSS and I will eventually get there, but until then how else do I code a background image for tables?

[edited by: keyplyr at 12:04 am (utc) on July 18, 2002]

Knowles

11:25 pm on Jul 17, 2002 (gmt 0)

10+ Year Member



<table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/bg.gif">

Its refering to the background used in table, thats not a valid attribute. To do it in css assign it a class. like
.tablebg {
background-image : url(images/bg.gif);
}

Then change the table tag to look like this
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tablebg">

That should work, I didnt test it and my CSS skills are not always the sharpest but I know you can assign a background image that way just not sure for a table.

keyplyr

12:45 am on Jul 18, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month




Thanks Knowles.

Yes - that's what I understood to be the CSS version, I just wasn't prepared to edit 100 pages right now - but I guess there's no time like the present.

Knowles

12:51 am on Jul 18, 2002 (gmt 0)

10+ Year Member



I dont think there is and validate, if it makes you feel better I had to do the same thing a while back, of course it wasnt 100 pages but I feel your pain.