Jump to content
  • 0

Помогите настроить валидность верстки!


AticMeN
 Share

Question

Проблема состоит в следующем:

Имеется скрипт выдвижного меню, вот сам код:

 

1-скопировать папку templates в свой шаблон (изменив предварительно ВАШ_ШАБЛОН на имя своего шаблона)
2-в файл стилей (чаще всего или css/engine.css или css/style.css) вашего шаблона вставить код:
 
a.s-menu:link, a.s-menu:visited {display:block; border-bottom:1px solid #f7f7f7; font-weight:bold; padding:3px 0px 3px 5px; color:#696969;}
a.s-menu:hover {background:#F3F3F3; border-bottom:1px solid #E7E7E7; color:#696969;}
a.ss-menu:link, a.ss-menu:visited {display:block; border-bottom:1px solid #f7f7f7; font-weight:normal; padding:3px 0px 3px 5px; color:#696969; margin-left:16px;}
a.ss-menu:hover {background:#F3F3F3; border-bottom:1px solid #E7E7E7; color:#696969;}
 
НАСТРОИТЬ ЦВЕТА ПОД СВОЙ ШАБЛОН!
3-в main.tpl вашего шаблона вставить
 
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="f-block"><tbody>
<tr><td class="b-middle">
<a href="/" class="s-menu"><img src="{THEME}/images/icons/zagruzka-plus.png" align="absmiddle" alt="" /> Загрузка+</a>
<a href="http://forum.zagruzka-plus.ru/" class="s-menu"><img src="{THEME}/images/icons/comments.png" align="absmiddle" alt="" /> Форум</a>
<a href="javascript://" onClick="$('#soft-menu').slideToggle('slow');" class="s-menu"><img src="{THEME}/images/icons/soft.png" align="absmiddle" alt="" /> Софт <img src="{THEME}/images/icons/arrow_down.png" alt="" align="absmiddle" style="margin:0px;"></a>
<div id="soft-menu" style="display:none; margin-bottom:5px;">
<a href="/soft/cd-dvd/" class="ss-menu"><img src="{THEME}/images/icons/category.png" align="absmiddle" alt="" /> CD/DVD</a>
<a href="/soft/ftp/" class="ss-menu"><img src="{THEME}/images/icons/category.png" align="absmiddle" alt="" /> FTP-Клиенты</a>
<a href="/soft/security/" class="ss-menu"><img src="{THEME}/images/icons/category.png" align="absmiddle" alt="" /> Безопасность</a>
<a href="/soft/archives/" class="ss-menu"><img src="{THEME}/images/icons/category.png" align="absmiddle" alt="" /> Архиваторы</a>
<a href="/soft/browsers/" class="ss-menu"><img src="{THEME}/images/icons/category.png" align="absmiddle" alt="" /> Браузеры</a>
<a href="/soft/graphic/" class="ss-menu"><img src="{THEME}/images/icons/category.png" align="absmiddle" alt="" /> Графика</a>
</div>
<a href="javascript://" onClick="$('#dle-menu').slideToggle('slow');" class="s-menu"><img src="{THEME}/images/icons/icon15.png" align="absmiddle" alt="" /> DataLife Egine <img src="{THEME}/images/icons/arrow_down.png" alt="" align="absmiddle" style="margin:0px;"></a>
<div id="dle-menu" style="display:none; margin-bottom:5px;">
<a href="/dle/dle-tempalates/" class="ss-menu"><img src="{THEME}/images/icons/category.png" align="absmiddle" alt="" /> Шаблоны</a>
<a href="/dle/modules/" class="ss-menu"><img src="{THEME}/images/icons/category.png" align="absmiddle" alt="" /> Модули</a>
<a href="/dle/dle-scripts/" class="ss-menu"><img src="{THEME}/images/icons/category.png" align="absmiddle" alt="" /> Скрипты</a>
</div>
<a href="javascript://" onClick="$('#ucoz-menu').slideToggle('slow');" class="s-menu"><img src="{THEME}/images/icons/ucoz.png" align="absmiddle" alt="" /> uCoz <img src="{THEME}/images/icons/arrow_down.png" alt="" align="absmiddle" style="margin:0px;"></a>
<div id="ucoz-menu" style="display:none; margin-bottom:5px;">
<a href="/ucoz/scripts/" class="ss-menu"><img src="{THEME}/images/icons/category.png" align="absmiddle" alt="" /> Скрипты</a>
<a href="/ucoz/tempalates/" class="ss-menu"><img src="{THEME}/images/icons/category.png" align="absmiddle" alt="" /> Шаблоны</a>
<a href="/ucoz/menu/" class="ss-menu"><img src="{THEME}/images/icons/category.png" align="absmiddle" alt="" /> Меню</a>
<a href="/ucoz/buttons/" class="ss-menu"><img src="{THEME}/images/icons/category.png" align="absmiddle" alt="" /> Кнопки</a>
<a href="/ucoz/icons/" class="ss-menu"><img src="{THEME}/images/icons/category.png" align="absmiddle" alt="" /> Иконки</a>
<a href="/ucoz/rank/" class="ss-menu"><img src="{THEME}/images/icons/category.png" align="absmiddle" alt="" /> Ранги</a>
<a href="/ucoz/forum-tempalates/" class="ss-menu"><img src="{THEME}/images/icons/category.png" align="absmiddle" alt="" /> Шаблоны форума</a>
</div>
<a href="/music" class="s-menu"><img src="{THEME}/images/icons/music.png" align="absmiddle" alt="" /> Музыка</a>
</td></tr>
<tr><td class="b-bottom"></td></tr>
</tbody></table>

 

 

И все бы хорошо, все установилось. НО validator - выдает вот такое сообщение при проверке:

 

Line 426, Column 37there is no attribute "onClick" <a href="javascript://" onClick="$('#soft-menu').slideToggle('slow');" clas…

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.

 

 

Я так понял это связано с атрибутом "onClick" - Помогите, как это можно исправить?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Если в коде используется 'href="javascript://"', говорить о валидности нет смысла. Имхо.

Но вообще можно прогнать сообщение валидатора через гугл-транслейт — там в последнем абзаце отличная подсказка:)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy