Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [html] problem z menu opartym na divach, a dokładniej ze wskazaniami walidatora w3c
tomkoz11
post
Post #1





Grupa: Zarejestrowani
Postów: 12
Pomógł: 0
Dołączył: 16.03.2006

Ostrzeżenie: (0%)
-----


Mam następujący problem - nie wiem jak przerobić menu, aby to było uznawane za zgodne ze standardami przez walidator w3c.
Wiem o co chodzi - że div jako element blokowy, nie może znajdować się w <a></a>, tyle że nie mam pomysłu jak to przerobić by było wszystko ok w walidatorze. O usunięciu divów nie ma co rozmawiać bo one są niezbędne, gdyż wykorzystuję je do uzyskania efektu podświetlenia onmouseover, a jeżeli <a> umieściłbym już w divach to trzeba by się było napracować, żeby w ogóle trafić w link. ;/ Mój Doctype to HTML 4.01 Strict

Przykładowy link w menu wygląda tak:

  1. <a href="index.htm"><div class="link_menu">STRONA GŁÓWNA</div></a>


Komunikaty które zwraca walidator:

Cytat
document type does not allow element "DIV" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag

Cytat
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.08.2025 - 22:40