Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: Problemy w strict'owaniu dokumentu xhtml'a
Forum PHP.pl > Forum > Po stronie przeglądarki > HTML \ XHTML
MitS
Witam!

Mam drobniusi problem, a mianowicie nie moge wystrictować tego dokumentu:

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <title>SL1.GHTLY STUDIO</title>
  4. <link rel="stylesheet" type="text/css" href="style-2.css" />
  5. <?xml-stylesheet type="text/css" href="style-2.css" ?>
  6. <meta http-equiv="Content-Language" content="pl" />
  7. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
  8. </head>
  9. <body >
  10. <table style="border: 0pt none; width: 100%;">
  11. <tr>
  12. <td style="background: transparent url(images/www/s7art/1.jpg) repeat scroll 0% 50%; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial; height: 150px;">
  13. </td>
  14. </tr>
  15. <tr>
  16. <td>
  17. <p style="text-align: center;">&nbsp; </p>
  18. <p style="text-align: center;"><a href="about_us.html" class="klasa1">
  19. [ O NAS ]</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="about_us.html" class="klasa1">
  20. [ PORTFOLIO ]</a>&nbsp;&nbsp;&nbsp; <a href="about_us.html" class="klasa1">
  21. [ CENNIK ]</a>&nbsp;&nbsp;&nbsp;<a href="about_us.html" class="klasa1">
  22. [ KONTAKT ]</a> </p>
  23. <p style="text-align: center;">&nbsp; </p>
  24. </td>
  25. </tr>
  26. <tr>
  27. <td>
  28. </td>
  29. </tr>
  30. <!-- Dać na środek tą tabele !-->
  31. <table style="width: 508px;">
  32. <tr>
  33. <td>
  34. <img src="images/www/ent3r//spacer.gif" style="width: 119px; height: 1px" alt="</span>" /></td>
  35. <td>
  36. <img src="images/www/ent3r//spacer.gif" style="width: 5px; height: 1px" alt="" /></td>  
  37. <td>
  38. <img src="images/www/ent3r/spacer.gif" style="width: 18px; height: 1px" alt="" /></td>
  39. <td>
  40. <img src="images/www/ent3r/spacer.gif" style="width: 153px; height: 1px" alt="" /></td>
  41. <td>
  42. <img src="images/www/ent3r/spacer.gif" style="width: 3px; height: 1px" alt="" /></td>
  43. <td>
  44. <img src="images/www/ent3r/spacer.gif" style="width: 131px; height: 1px" alt="" /></td>
  45. <td>
  46. <img src="images/www/ent3r/spacer.gif" style="width: 12px; height: 1px" alt="" /></td>
  47. <td>
  48. <img src="images/www/ent3r/spacer.gif" style="width: 64px; height: 1px" alt="" /></td>
  49. <td>
  50. <img src="images/www/ent3r/spacer.gif" style="width: 3px; height: 1px" alt="" /></td>
  51. <td></td>
  52. </tr>
  53. <tr>
  54. <td colspan=8>
  55. <img src="images/www/ent3r/1_01.gif" style="width: 505px; height: 9px" alt="" /></td>
  56. <td rowspan=15>
  57. <img src="images/www/ent3r/1_02.gif" style="width: 3px; height: 550px"  alt="" /></td>
  58. <td>
  59. <img src="images/www/ent3r/spacer.gif"style="width: 1px; height: 9px"  alt="" /></td>
  60. </tr>
  61. <tr>
  62. <td colspan=2 rowspan=2 style="background: transparent url(images/www/ent3r/1_03.gif)">  
  63. </td>
  64. <td colspan=2 rowspan=2>
  65. <img src="images/www/ent3r/1_04.gif" style="width: 171px; height: 36px"  alt="" /></td>
  66. <td rowspan=13>
  67. <img src="images/www/ent3r/1_05.gif" style="width: 3px; height: 536px"  alt="" /></td>
  68. <td style="background: transparent url(images/www/ent3r/1_06.gif)">  
  69. </td>
  70. <td colspan=2>
  71. <img src="images/www/ent3r/1_07.gif" style="width: 76px; height: 33px"  alt="" /></td>
  72. <td>
  73. <img src="images/www/ent3r/spacer.gif" style="width: 1px; height: 33px"  alt="" /></td>
  74. </tr>
  75. <tr>  
  76. <td colspan=3 rowspan=3>&nbsp; </td>
  77. <td>
  78. <img src="images/www/ent3r/spacer.gif" style="width: 1px; height: 3px"  alt="" /></td>
  79. </tr>
  80. <tr>  
  81. <td colspan=4>&nbsp; </td>
  82. <td>
  83. <img src="images/www/ent3r/spacer.gif" style="width: 1px; height: 64px"  alt="" /></td>
  84. </tr>
  85. <tr>
  86. <td colspan=4 rowspan=3>
  87. <img src="images/www/ent3r/1_10.gif" style="width: 295px; height: 7px"  alt="" /></td>
  88. <td>
  89. <img src="images/www/ent3r/spacer.gif" style="width: 1px; height: 1px"  alt="" /></td>
  90. </tr>
  91. <tr>
  92. <td colspan=3>
  93. <img src="images/www/ent3r/1_11.gif" style="width: 207px; height: 5px"  alt="" /></td>
  94. <td>
  95. <img src="images/www/ent3r/spacer.gif" style="width: 1px; height: 5px"  alt="" /></td>
  96. </tr>
  97. <tr>
  98. <td colspan=2 rowspan=2 style="background: transparent url(images/www/ent3r/1_12.gif)">
  99. </td>
  100. <td rowspan=2>
  101. <img src="images/www/ent3r/1_13.gif" style="width: 64px; height: 37px"  alt="" /></td>
  102. <td>
  103. <img src="images/www/ent3r/spacer.gif" style="width: 1px; height: 1px"  alt="" /></td>
  104. </tr>
  105. <tr>
  106. <td rowspan=2 style="background: transparent url(images/www/ent3r/1_14.gif)">  
  107. </td>
  108. <td colspan=3 rowspan=2>
  109. <img src="images/www/ent3r/1_15.gif" style="width: 176px; height: 44px"  alt="" /></td>
  110. <td>
  111. <img src="images/www/ent3r/spacer.gif" style="width: 1px; height: 36px"  alt="" /></td>
  112. </tr>
  113. <tr>
  114. <td colspan=3 rowspan=2>&nbsp; </td>
  115. <td>
  116. <img src="images/www/ent3r/spacer.gif" style="width: 1px; height: 8px"  alt="" /></td>
  117. </tr>
  118. <tr>  
  119. <td colspan=4>&nbsp; </td>
  120. <td>
  121. <img src="images/www/ent3r/spacer.gif" style="width: 1px; height: 159px"  alt="" /></td>
  122. </tr>
  123. <tr>
  124. <td colspan=4>
  125. <img src="images/www/ent3r/1_18.gif" style="width: 295px; height: 9px"  alt="" /></td>
  126. <td colspan=3 rowspan=2>
  127. <img src="images/www/ent3r/1_19.gif" style="width: 207px; height: 12px"  alt="" /></td>
  128. <td>
  129. <img src="images/www/ent3r/spacer.gif" style="width: 1px; height: 9px"  alt="" /></td>
  130. </tr>
  131. <tr>
  132. <td colspan=3 rowspan=2 style="background: transparent url(images/www/ent3r/1_20.gif)">  
  133. </td>
  134. <td rowspan=2>
  135. <img src="images/www/ent3r/1_21.gif" style="width: 153px; height: 29px"  alt="" /></td>
  136. <td>
  137. <img src="images/www/ent3r/spacer.gif" style="width: 1px; height: 3px"  alt="" /></td>  
  138. </tr>
  139. <tr>
  140. <td colspan=3 rowspan=2>
  141. <img src="images/www/ent3r/1_22.gif" style="width: 207px; height: 214px"  alt="" /></td>
  142. <td>
  143. <img src="images/www/ent3r/spacer.gif" style="width: 1px; height: 26px"  alt="" /></td>
  144. </tr>
  145. <tr>
  146. <td colspan=4>&nbsp; </td>
  147. <td>
  148. <img src="images/www/ent3r/spacer.gif" style="width: 1px; height: 188px"  alt="" /></td>
  149. </tr>
  150. <tr>
  151. <td colspan=8>
  152. <img src="images/www/ent3r/1_24.gif" style="width: 505px; height: 5px"  alt="" /></td>
  153. <td>
  154. <img src="images/www/ent3r/spacer.gif" style="width: 1px; height: 5px"  alt="" /></td>
  155. </tr>
  156. <tr>
  157. <td colspan=9>
  158. <img src="images/www/ent3r/1_25.gif" style="width: 508px; height: 14px"  alt="" /></td>
  159. <td>
  160. <img src="images/www/ent3r/spacer.gif"style="width: 1px; height: 14px"  alt="" /><[color=blue]/td>
  161. </tr>
  162. <!-- koniec !-->
  163. <table style="border: 0pt none; width: 100%;">
  164. <tr>
  165. <td>
  166. <p style="text-align: center;">&nbsp; </p>
  167. <p style="text-align: center;"><span style="font-size: 9pt;">Copyright (c)
  168. 2004-2005 &nbsp;&nbsp;&nbsp; <span style="font-size: 9pt; color: rgb(167, 34, 34);">SL1.GHTLY
  169. STUDIO </span>&nbsp;&nbsp;&nbsp; All rights reserved! </span> </p>
  170. <p>&nbsp; </p>
  171. <p style="text-align: center;">
  172. <a href="http://validator.w3.org/check?uri=referer">
  173. <img style="border: 0pt none; width: 88px; height: 31px;" src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Strict" /> </a>
  174. <a href="http://jigsaw.w3.org/css-validator/">
  175. <img style="border: 0pt none; width: 88px; height: 31px;" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="valid css!" /> </a>
  176. </p>
  177. </td>
  178. </tr>
  179. </body>
  180. </html>


Dając ten kod na http://validator.w3.org/ pojawiają mi sie takie błedy:


Cytat
Result:    Failed validation, 34 errors
File: ent3r.html
Encoding: iso-8859-2
Doctype: XHTML 1.0 Strict
Root Namespace:  http://www.w3.org/1999/xhtml

Note: The Validator XML support has some limitations.
This page is not Valid XHTML 1.0 Strict!

Below are the results of checking this document for XML well-formedness and validity.

   1. Error Line 58 column 12: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.

<td colspan=8>

      ✉
   2. Error Line 60 column 12: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.

<td rowspan=15>

      ✉
   3. Error Line 66 column 12: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.

<td colspan=2 rowspan=2 style="background: transparent url(images/www/ent3r/1_03

      ✉
   4. Error Line 66 column 22: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.

<td colspan=2 rowspan=2 style="background: transparent url(images/www/ent3r/1_03

      ✉
   5. Error Line 68 column 12: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.

<td colspan=2 rowspan=2>

      ✉
   6. Error Line 68 column 22: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.

<td colspan=2 rowspan=2>

      ✉
   7. Error Line 70 column 12: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.

<td rowspan=13>

      ✉
   8. Error Line 74 column 12: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.

<td colspan=2>

      ✉
   9. Error Line 80 column 12: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.

<td colspan=3 rowspan=3>&nbsp; </td>

      ✉
  10. Error Line 80 column 22: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.

<td colspan=3 rowspan=3>&nbsp; </td>

      ✉
  11. Error Line 85 column 12: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.

<td colspan=4>&nbsp; </td>

      ✉
  12. Error Line 90 column 12: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.

<td colspan=4 rowspan=3>

      ✉
  13. Error Line 90 column 22: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.

<td colspan=4 rowspan=3>

      ✉
  14. Error Line 96 column 12: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.

<td colspan=3>

      ✉
  15. Error Line 102 column 12: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.

<td colspan=2 rowspan=2 style="background: transparent url(images/www/ent3r/1_12

      ✉
  16. Error Line 102 column 22: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.

<td colspan=2 rowspan=2 style="background: transparent url(images/www/ent3r/1_12

      ✉
  17. Error Line 104 column 12: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.

<td rowspan=2>

      ✉
  18. Error Line 110 column 12: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.

<td rowspan=2 style="background: transparent url(images/www/ent3r/1_14.gif)"> 

      ✉
  19. Error Line 112 column 12: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.

<td colspan=3 rowspan=2>

      ✉
  20. Error Line 112 column 22: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.

<td colspan=3 rowspan=2>

      ✉
  21. Error Line 118 column 12: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.

<td colspan=3 rowspan=2>&nbsp; </td>

      ✉
  22. Error Line 118 column 22: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.

<td colspan=3 rowspan=2>&nbsp; </td>

      ✉
  23. Error Line 123 column 12: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.

<td colspan=4>&nbsp; </td>

      ✉
  24. Error Line 128 column 12: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.

<td colspan=4>

      ✉
  25. Error Line 130 column 12: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.

<td colspan=3 rowspan=2>

      ✉
  26. Error Line 130 column 22: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.

<td colspan=3 rowspan=2>

      ✉
  27. Error Line 136 column 12: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.

<td colspan=3 rowspan=2 style="background: transparent url(images/www/ent3r/1_20

      ✉
  28. Error Line 136 column 22: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.

<td colspan=3 rowspan=2 style="background: transparent url(images/www/ent3r/1_20

      ✉
  29. Error Line 138 column 12: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.

<td rowspan=2>

      ✉
  30. Error Line 144 column 12: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.

<td colspan=3 rowspan=2>

      ✉
  31. Error Line 144 column 22: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.

<td colspan=3 rowspan=2>

      ✉
  32. Error Line 150 column 12: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.

<td colspan=4>&nbsp; </td>

      ✉
  33. Error Line 155 column 12: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.

<td colspan=8>

      ✉
  34. Error Line 161 column 12: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.

<td colspan=9>



I prócz tego w powyższym kodzie strony jest moment:

  1. ...
  2. ...
  3. ...
  4. <!-- Dać na środek tą tabele !-->
  5.  
  6. <table style="width: 508px;">
  7. <tr>
  8. <td>
  9. <img src="images/www/ent3r//spacer.gif" style="width: 119px; height: 1px" alt="" /></td>
  10. ...
  11. ...
  12. ...
  13. <!-- koniec-->


i mój drugi własnie problem to danie tablei na środek ...
Bo gdy robie <p align="center"> ta tablea <p> <- to niestety nie jest zgodne ze standardami, natomaist jak robie <p style="text-align: center"> ta tablea <p> <- to w IE jest na środku tabela (ale niestety wraz z tekstem w niej) natomiast w firefoxie niestety jest w dalszym ciagu z lewej strony.

Pomoże mi ktoś z tym sie uporać questionmark.gif?/

<span style='color:red'>--
FiDO: nastepnym razem prosze uzywac poprawnego BBCode
[/color]
revyag
Sory, ale kod jest masakryczny. Tabel używa się do robienia tabel a nie layoutu strony.
Chcesz żeby strona była zgodna z pewnymi standardami to zrezygnuj z tabel. Teraz to tak wygląda jakby do malucha wsadzić super grajek i chwalić się że mam super furę snitch.gif
Co do błędów:
wszystkie atrybuty muszą być w cudzysłowach.
MitS
ok dzięki za odpowiedź, pomogło i jeszcze dwa pytania:
1. Czemu nie można robić tabelami layoutu questionmark.gif Czy muszą to być koniecznie znaczniki <div> questionmark.gif?
2. Co zrobić by wyśrodkować tą tabelkę questionmark.gifquestionmark.gif

Pozdro
FiDO
Polecam lekture tego: http://www.osiolki.net/tabelki/index.html
MitS
Dzięki FIDO to se zaraz przeczytam, jednak potrzebuje jednej rzeczy, tego wyśrodkowania tabeli w stylach kaskadowych... jak to zrobić questionmark.gif
Kill3R
srodkowanie tabeli

temat poruszany na forum juz milion razy
  1. html, body {
  2. text-align: center; /* to dla internet explorera */
  3. }
  4.  
  5. table#glownatabela {
  6. margin: 0 auto; /* to dla innych przgladarek */
  7. text-align: left; /*to ukladanie textu bo ten wyzszy styl html, body centruje wszystko lacznie z zawartoscia */
  8. }

a co do layoutow tabelkowych to jak chcesz to nikt ci nie kaze robic w DIVach

tylko dawaj odpowiedni naglowek a nie xhtml 1.0 strict bo tu na tabelkach nie moze byc
MitS
ok dzięki smile.gif
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.