Autor Zpráva
Chadas
Profil
Mám na webu odkaz na facebokk + ikonu pro likování. Validátoru se ale nelíbí link který vygeneroval facebook. Můžete mi prosím někdo poradit jak by to mělo být aby to bylo funkční a zároveň validní? Já vím, spousta rad bude abych se na validitu ... ale přece to nějak jít musí :) Určitě nejsem jediný kdo s tímto má problém. Díky moc.

<div class="fb-like" "https://www.facebook.com/neco.nekde" data-layout="button" width="55" data-action="like" data-show-faces="true" data-share="false"></div>

Info z validátoru.
An attribute name (and some attribute values) must start with one of a restricted set of characters. This error usually indicates that you have failed to add a closing quotation mark on a previous attribute value (so the attribute value looks like the start of a new attribute) or have used an attribute that is not defined (usually a typo in a common attribute name).

Bohužel mě nenapadá kde chybí (jsou navíc) nějaké uvozovky nebo co by se mělo opravit :(
Tomáš123
Profil
Chadas:
URL adrese zvykne predchádzať atribút href, či src. Tej tvojej tam niečo chýba. Nemá do byť odkaz v <div>e?
lionel messi
Profil
Problémom je zvýraznená časť (hodnota atribútu bez jeho názvu):

<div class="fb-like" "https://www.facebook.com/neco.nekde" data-layout="button" width="55" data-action="like" data-show-faces="true" data-share="false"></div>

Nutné je zadať názov atribútu (v tomto prípade data-href, overené priamo na Facebooku):

<div class="fb-like" data-href="https://www.facebook.com/neco.nekde" data-layout="button" width="55" data-action="like" data-show-faces="true" data-share="false"></div>

Tomáš123:
Nemá do byť odkaz v <div>e?
Nie, ide o jeden z takzvaných social pluginov.
Chadas
Profil
V této chvíli vypisuje validátor 2 chyby. Pokud doplním to chybějící data-href= je hned místo původních dvou chyb chyb 9 :(

Popis chyby je zde:

Line 51, Column 32: there is no attribute "DATA-HREF"

<div class="fb-like" data-href="https://www.facebook.com/neco.nekde" data-l…

✉

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.
lionel messi
Profil
Chadas:
Skús uviesť na úplný začiatok stránky <!doctype html> (ak tam už značka začínajúca na <!doctype je, prepíš ju). Stránku máš veľmi pravdepodobne (možno dokonca neúmyselne) v tzv. quirk móde, namiesto neho je oveľa lepšie používať štandardný vykresľovací mód.
Str4wberry
Profil
Atributy data-* jsou validní až v HTML 5. validator.webylon.info/check?uri=save:134900390997571FB8F1A8A7A222AF30&ss=1

Jinak i po změně <!doctype> ještě bude nevalidní atribut width. validator.webylon.info/check?uri=save:83BA8B7F67D078F34A6FB285B0343EBB&ss=1
Bubák
Profil
Str4wberry:
ještě bude nevalidní atribut width
Ten funguje jen pro několik málo elementů, ale DIV mezi ně nepatří.

Vaše odpověď


Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm:

0