Help - 1 error that I can't get rid o!

View: New views
3 Messages — Rating Filter:   Alert me  

Help - 1 error that I can't get rid o!

by Phil Ainley :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I have managed to whittle the errors down to 1, but     I can't sort it, can
anyone help at all please?

Thanks
Phil


Kind regards,
Phil Ainley – Creative Director



Flock of Pigs Ltd
Floor 2, 1 Livsey Street
Rochdale
Lancs. OL16 1SS

T: 01706 716272
M: 07773 168301
F: 01706 759254
E: phil@...
www.flockofpigs.co.uk

Graphic Design . Branding . Websites . Brochure Design . Advertising

“Flock of Pigs’ design doesn’t cost money ...it makes money!”









   1.   Error  Line 67, Column 50: Attribute "background" exists, but can
not be used for this element.

                <td width="25" valign="top"
background="images/shadowlt.gif"> </td>

      ✉

      You have used the attribute named above in your document, but the
document type you are using does not support that attribute for this
element. This error is often caused by incorrect use of the "Strict"
document type with a document that uses frames (e.g. you must use the
"Transitional" document type to get the "target" attribute), or by using
vendor proprietary extensions such as "marginheight" (this is usually fixed
by using CSS to achieve the desired effect instead).

      This error may also result if the element itself is not supported in
the document type you are using, as an undefined element will have no
supported attributes; in this case, see the element-undefined error message
for further information.

      How to fix: check the spelling and case of the element and attribute,
(Remember XHTML is all lower-case) and/or check that they are both allowed
in the chosen document type, and/or use CSS instead of this attribute. If
you received this error when using the <embed> element to incorporate flash
media in a Web page, see the FAQ item on valid flash.




Re: Help - 1 error that I can't get rid o!

by Dag-Erling Smørgrav :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Phil Ainley <phil@...> writes:
> I have managed to whittle the errors down to 1, but     I can't sort it, can
> anyone help at all please?
> [...]
>    1.   Error  Line 67, Column 50: Attribute "background" exists, but can
> not be used for this element.
>
>                 <td width="25" valign="top"
> background="images/shadowlt.gif"> </td>

A td element can't have a background attribute.  Use a style sheet
instead.

DES
--
Dag-Erling Smørgrav - des@...


Re: Help - 1 error that I can't get rid o!

by David Dorward-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 3 Nov 2009, at 14:19, Phil Ainley wrote:
> I have managed to whittle the errors down to 1, but     I can't sort  
> it, can
> anyone help at all please?

>   1.   Error  Line 67, Column 50: Attribute "background" exists, but  
> can
> not be used for this element.
>
>                <td width="25" valign="top"
> background="images/shadowlt.gif"> </td>

The root cause of this is that you are using tables for layout  
(instead of CSS and elements with appropriate semantics[1]).

The how to fix information does tell you how to hack around the issue:

> check that they are both allowed
> in the chosen document type, and/or use CSS instead of this attribute

… but you really should scrap your existing layout code and redo it  
using modern techniques. We're not in the 20th century any longer.

[1] Or, at least, without inappropriate semantics.

--
David Dorward
http://dorward.me.uk