WeLoveCSS Logo
Home Profile Members Search Rules Help New Posts



WeLoveCSS > WEB DESIGN > HTML & XHTML > there is no attribute "data-bg" - when validating any help

Reply
  Thread Tools Display Modes
Old 19th March 12, 05:52 PM   #1
ahanslot
WLC Member
 
Join Date: Mar 2012
Posts: 3
Default there is no attribute "data-bg" - when validating any help

ive added a javascript menu to my page and uses data-bg to get images, when trying to alidate under any doctype I get this error any help ?


Error Line 80, Column 37: there is no attribute "data-bg"

<div class="sbi_panel" data-bg="images/4.jpg">



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.
ahanslot is offline   Reply With Quote
Old 19th March 12, 08:56 PM   #2
chrishirst
Banned
 
Join Date: Jun 2006
Location: Blackp ool U.K.
Posts: 3,197
Default Re: there is no attribute "data-bg" - when validating any help

There is no such attribute in the current HTML specifications.


HTML5 introduces the concept of custom data attributes.
chrishirst is offline   Reply With Quote
Old 19th March 12, 10:06 PM   #3
ahanslot
WLC Member
 
Join Date: Mar 2012
Posts: 3
Default Re: there is no attribute "data-bg" - when validating any help

Quote:
Originally Posted by chrishirst View Post
There is no such attribute in the current HTML specifications.


HTML5 introduces the concept of custom data attributes.
could i change my doctype to html5 to allow it ? or some other way
ahanslot is offline   Reply With Quote
Old 20th March 12, 11:20 AM   #4
chrishirst
Banned
 
Join Date: Jun 2006
Location: Blackp ool U.K.
Posts: 3,197
Default Re: there is no attribute "data-bg" - when validating any help

Only if you are remotely bothered about fairly pointless "validation".
chrishirst is offline   Reply With Quote
Old 20th March 12, 10:34 PM   #5
ahanslot
WLC Member
 
Join Date: Mar 2012
Posts: 3
Default Re: there is no attribute "data-bg" - when validating any help

Quote:
Originally Posted by chrishirst View Post
Only if you are remotely bothered about fairly pointless "validation".
i need to validate to cos its for uni cw lol
ahanslot is offline   Reply With Quote
Old 21st March 12, 10:00 AM   #6
chrishirst
Banned
 
Join Date: Jun 2006
Location: Blackp ool U.K.
Posts: 3,197
Default Re: there is no attribute "data-bg" - when validating any help

There's your answer then.
chrishirst is offline   Reply With Quote
Reply


Thread Tools
Display Modes
Linear Mode Linear Mode

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:39 AM.



Home | Advertise | Contact Us | Top
Home | Advertise | Contact Us | Top

Copyright© 2006 WeLoveCSS.com. All Rights Reserved.
Powered by vBulletin Version 3.8.4 Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.