Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [HTML] Menu problem
marcin0077
post
Post #1





Grupa: Zarejestrowani
Postów: 94
Pomógł: 0
Dołączył: 18.10.2008

Ostrzeżenie: (10%)
X----


Witam

Robię stronkę www która oczywiście zawiera menu i mam pewien problem zrobiłem takie niby guziki tylko jak robię link to jest do samego tekstu a nie do całego guzika i nie mam pojęcia jak to zmienić ;/
Kod
<table width=170 height=150 border=0 cellPadding=0 bgcolor=#000000 cellSpacing=1><tr>

<td bgcolor=#5bc9fc HEIGHT=30 style="cursor: hand; padding-left:5;" onMouseOver='onColor(this);' onMouseOut='offColor(this)'>

<A HREF="index.html"><b>Strona główna</b></A>
</td>

</TR>
<tr>

<td bgcolor=#5bc9fc HEIGHT=30 style="cursor: hand; padding-left:5;" onMouseOver='onColor(this);' onMouseOut='offColor(this)'>

<A HREF="222222.html"><b><font color="red">222222</font></b></A>
</td>

</TR>

<tr>

<td bgcolor=#5bc9fc HEIGHT=30 style="cursor: hand; padding-left:5;" onMouseOver='onColor(this);' onMouseOut='offColor(this)'>

<A HREF="333333.html"><b>333333</b></A>
</td>

</TR>
<tr>

<td bgcolor=#5bc9fc HEIGHT=30 style="cursor: hand; padding-left:5;" onMouseOver='onColor(this);' onMouseOut='offColor(this)'>

<A HREF="444444.html"><b>444444</b></A>
</td>

</TR>
<tr>

<td bgcolor=#5bc9fc HEIGHT=30 style="cursor: hand; padding-left:5;" onMouseOver='onColor(this);' onMouseOut='offColor(this)'>

<A HREF="555555.html"><b>555555</b></A>
</td>


</TR>

<TR><TD></TD>

</tr></table>

Pomoże ktoś?

Ten post edytował marcin0077 18.10.2008, 19:43:19
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
hiszpanespaniol
post
Post #2





Grupa: Zarejestrowani
Postów: 213
Pomógł: 39
Dołączył: 7.04.2008
Skąd: 3city

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


jeżeli ten css działa też na inne tabele, to zidentyfikuj jakoś tą konkretną tabelę albo odnośniki w niej. Możesz np. nadać im klasę css, albo całej tabeli menu identyfikator dać i później jego nazwą poprzedzić definicję css. Sposób jest dobry, ale podkreślam, że to jest najszybszy (nie najlepszy) sposób, żeby Ci zadziałało jak chcesz.

Majareq: oto moja argumentacja (a raczej w3c):

Cytat
# document type does not allow element "A" here; missing one of "TH", "TD" start-tag .

<a href="#"><td>komórka</td></a>

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>").
# Error Line 16, Column 15: document type does not allow element "TD" here .

<a href="#"><td>komórka</td></a>

The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).


test zrobiłem dla 4.01 TRANSITIONAL


Pomijając wyniki z walidatora, mogą podać jeszcze takie argumenty:

- tabela służy do wyświetlania danych tabelarycznych (trochę już oklepany tekst, ale słuszny)

- odnośnikiem powinien być tekst lub obrazek, jak logika wskazuje, a nie komórka tabeli. Komórka będąca odnośnikiem jest jak.... laptop którym bijesz brawo komuś zamykając go i otwierając.

- nie powinieneś komuś takich rzeczy radzić, bo jesli tak się nauczy i kiedyś gdzieś da podobny kod i ktoś go wyśmieje, to powie "na forum php tak mi poradzili i to był ktoś kto ma dużo "pomógł"



Czy to jest wystarczająca argumentacja?
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: 6.10.2025 - 23:18