Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [inne]Problem z wyświetlaniem strony
Forum PHP.pl > Forum > Przedszkole
Arsanael
Witam, mam dziwny problem z wyświetlaniem mojej strony w różnych przeglądarkach. W mozilli Firefox jest wszystko ok ale w IE oraz Operze wyświetla sie tylko białe puste tło, co może być tego przyczyną?
patryczakowy
Najlepiej jak byś podał kod, tak w ciemno trudno powiedzieć ja stawiam na złą deklarację strony
deirathe
Błąd w js?? To może być wsyzstko... Czekaj zapytam szklanej kuli, która nigdy się nie myli w tych sprawach.
Moja szklana kula mówi że twoja strona prawdopodobnie nie działa bo zrobiłeś gdzieś błąd.

//Odpowiedź adekwatna do zapytania tongue.gif
Arsanael
  1. <?php
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  3. "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  4. <html xmlns="http://www.w3c.org/1999/xhtml" xml:lang="pl" lang="pl">
  5. <head>
  6. <link rel="Shortcut icon" href="images/hicon.ico" />
  7.  
  8. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  9. <title> <title>
  10. <style type="text/css">
  11.  
  12. #div {
  13. margin: 0 auto;
  14. padding-top: 0.2em;
  15. line-height: 1.25
  16. position: relative; top: 50px;
  17. margin: 0;
  18. }
  19.  
  20. .strona {
  21. width:900px;
  22. border: 1px solid #C0C0C0;
  23. margin-left: auto;
  24. margin-right: auto;
  25.  
  26. cursor: default;
  27. margin-top: -9px;
  28. background-image:url("images/tlo.JPG");
  29. }
  30. </style>
  31.  
  32.  
  33.  
  34. </head>';
  35.  
  36.  
  37.  
  38. <div class="strona ">
  39. <center>
  40. <table height="200" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top: -5px;">
  41. <tr>
  42. <td>
  43. <center><img src="images/banner.PNG"></center>
  44. </td>
  45. </tr>
  46. </table>
  47.  
  48. <table width="750" height="43" background="/images/top_belka.png" align="center" border="0" cellpadding="0" cellspacing="0" style="margin-top: -6px;">
  49. <tr align="center">
  50.  
  51. <td>
  52. <a style="text-decoration: none;" href="index.php"><img src="images/homeP.png" onmouseover="this.src = \'/images/homeP.png\'" onmouseout="this.src = \'/images/homeP.png\'" border="0"></a>
  53. </td>
  54.  
  55. <td>
  56. <a style="text-decoration: none;" href="galeria.php"><img src="images/galeria.png" onmouseover="this.src = \'/images/galeriaP.png\'" onmouseout="this.src = \'/images/galeria.png\'" border="0"></a>
  57. </td>
  58. <td>
  59. <a style="text-decoration: none;" href="postacie.php"><img src="images/postacie.png" onmouseover="this.src = \'/images/postacieP.png\'" onmouseout="this.src = \'/images/postacie.png\'" border="0"></a>
  60. </td>
  61. <td>
  62. <a style="text-decoration: none;" href="http://www.forum.md-house.info"><img src="images/forum.png" onmouseover="this.src = \'/images/forumP.png\'" onmouseout="this.src = \'/images/forum.png\'" border="0"></a>
  63. </td>
  64. <td>
  65. <a style="text-decoration: none;" href="odcinki.php"><img src="images/odcinki.png" onmouseover="this.src = \'/images/odcinkiP.png\'" onmouseout="this.src = \'/images/odcinki.png\'" border="0"></a>
  66. </td>
  67. <td>
  68. <img src="images/izba.png" onmouseover="this.src = \'/images/izba.png\'" onmouseout="this.src = \'/images/izba.png\'" border="0">
  69. </td>
  70. </tr>
  71. </table>';
  72. ?>



Takie coś mam, coś jest źle?
3lair
jest szansa, że IE żle odczytuje nagłówek strony za pomocą dodatku do firefox sprawdź jakie nagłówki wysyłasz. Jeśli tak jak w moim przypadku wyślesz image/jpg użyj funkcji header() z php i wyślij nagłówek z kodowaniem np. utf-8 lub iso.

U mnie zadziałało.
deirathe
Dużo!! gdzie tag body? Czemu pierwszą linie wysyłasz pustą? Gdzie zakończenie html'a?questionmark.gif TY nawet nie masz podstaw z html'a. Weź tutorial z w3school przeczytaj o html'u a później bierz się do pisania stron...
Arsanael
  1. <?php
  2. print '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  4. "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  5. <html xmlns="http://www.w3c.org/1999/xhtml" xml:lang="pl" lang="pl">
  6. <head>
  7. <link rel="Shortcut icon" href="images/hicon.ico" />
  8.  
  9. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  10. <title><title>
  11. <style type="text/css">
  12.  
  13. #div {
  14. margin: 0 auto;
  15. padding-top: 0.2em;
  16. line-height: 1.25
  17. position: relative; top: 50px;
  18. margin: 0;
  19. }
  20.  
  21. @font-face {
  22. font-family: "Capture it";
  23. src: url("/fonts/Capture it.ttf");
  24. }
  25.  
  26. .strona {
  27. width:900px;
  28. border: 1px solid #C0C0C0;
  29. margin-left: auto;
  30. margin-right: auto;
  31.  
  32. cursor: default;
  33. margin-top: -9px;
  34. background-image:url("images/tlo.JPG");
  35. }
  36. </style>
  37.  
  38.  
  39.  
  40. </head>';
  41.  
  42. <body>
  43. <div class="strona ">
  44. <center>
  45. <table height="200" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top: -5px;">
  46. <tr>
  47. <td>
  48. <center><img src="images/banner.PNG"></center>
  49. </td>
  50. </tr>
  51. </table>
  52.  
  53. <table width="750" height="43" background="/images/top_belka.png" align="center" border="0" cellpadding="0" cellspacing="0" style="margin-top: -6px;">
  54. <tr align="center">
  55.  
  56. <td>
  57. <a style="text-decoration: none;" href="index.php"><img src="images/homeP.png" onmouseover="this.src = \'/images/homeP.png\'" onmouseout="this.src = \'/images/homeP.png\'" border="0"></a>
  58. </td>
  59.  
  60. <td>
  61. <a style="text-decoration: none;" href="galeria.php"><img src="images/galeria.png" onmouseover="this.src = \'/images/galeriaP.png\'" onmouseout="this.src = \'/images/galeria.png\'" border="0"></a>
  62. </td>
  63. <td>
  64. <a style="text-decoration: none;" href="postacie.php"><img src="images/postacie.png" onmouseover="this.src = \'/images/postacieP.png\'" onmouseout="this.src = \'/images/postacie.png\'" border="0"></a>
  65. </td>
  66. <td>
  67. <a style="text-decoration: none;" href="http://www.forum.md-house.info"><img src="images/forum.png" onmouseover="this.src = \'/images/forumP.png\'" onmouseout="this.src = \'/images/forum.png\'" border="0"></a>
  68. </td>
  69. <td>
  70. <a style="text-decoration: none;" href="odcinki.php"><img src="images/odcinki.png" onmouseover="this.src = \'/images/odcinkiP.png\'" onmouseout="this.src = \'/images/odcinki.png\'" border="0"></a>
  71. </td>
  72. <td>
  73. <img src="images/izba.png" onmouseover="this.src = \'/images/izba.png\'" onmouseout="this.src = \'/images/izba.png\'" border="0">
  74. </td>
  75. </tr>
  76. </table>
  77. </body>
  78. </html>';
  79. ?>



Lepiej? masz juz znaczniki html i body, strona dalej nie działa.
Spawnm


  1. padding-top: 0.2em;
  2.  
  3. line-height: 1.25
  4.  
  5. position: relative; top: 50px;


masz kilka literówek, popraw je, wtedy pewnie zacznie działać.
deirathe
To że swój kod poprawiasz to nie robisz mi tym łaski... Sprawdź ścieżki do obrazkow a tu masz swojego html poniżej:
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3c.org/1999/xhtml" xml:lang="pl" lang="pl">
  3.  
  4.  
  5. <link rel="Shortcut icon" href="images/hicon.ico" />
  6.  
  7.  
  8.  
  9. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  10.  
  11.  
  12. <style type="text/css">
  13.  
  14.  
  15.  
  16. div {
  17.  
  18. margin: 0 auto;
  19.  
  20. padding-top: 0.2em;
  21.  
  22. line-height: 1.25
  23.  
  24. position: relative; top: 50px;
  25.  
  26. margin: 0;
  27.  
  28. }
  29.  
  30.  
  31.  
  32. @font-face {
  33.  
  34. font-family: "Capture it";
  35.  
  36. src: url("/fonts/Capture it.ttf");
  37.  
  38. }
  39.  
  40.  
  41.  
  42. .strona {
  43.  
  44. width:900px;
  45.  
  46. border: 1px solid C0C0C0;
  47.  
  48. margin-left: auto;
  49.  
  50. margin-right: auto;
  51.  
  52.  
  53.  
  54. cursor: default;
  55.  
  56. margin-top: -9px;
  57.  
  58. background-image:url("images/tlo.JPG");
  59.  
  60. }
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69. </head>
  70.  
  71.  
  72.  
  73.  
  74. <div class="strona ">
  75.  
  76.  
  77. <table height="200" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top: -5px;">
  78.  
  79. <tr>
  80.  
  81. <td>
  82.  
  83. <center><img src="images/banner.PNG"></center>
  84.  
  85. </td>
  86.  
  87. </tr>
  88.  
  89.  
  90.  
  91.  
  92. <table width="750" height="43" background="/images/top_belka.png" align="center" border="0" cellpadding="0" cellspacing="0" style="margin-top: -6px;">
  93.  
  94. <tr align="center">
  95.  
  96.  
  97.  
  98. <td>
  99.  
  100. <a style="text-decoration: none;" href="index.php"><img src="images/homeP.png" onmouseover="this.src = \'/images/homeP.png\'" onmouseout="this.src = \'/images/homeP.png\'" border="0"></a>
  101.  
  102. </td>
  103.  
  104.  
  105.  
  106. <td>
  107.  
  108. <a style="text-decoration: none;" href="galeria.php"><img src="images/galeria.png" onmouseover="this.src = \'/images/galeriaP.png\'" onmouseout="this.src = \'/images/galeria.png\'" border="0"></a>
  109.  
  110. </td>
  111.  
  112. <td>
  113.  
  114. <a style="text-decoration: none;" href="postacie.php"><img src="images/postacie.png" onmouseover="this.src = \'/images/postacieP.png\'" onmouseout="this.src = \'/images/postacie.png\'" border="0"></a>
  115.  
  116. </td>
  117.  
  118. <td>
  119.  
  120. <a style="text-decoration: none;" href="http://www.forum.md-house.info"><img src="images/forum.png" onmouseover="this.src = \'/images/forumP.png\'" onmouseout="this.src = \'/images/forum.png\'" border="0"></a>
  121.  
  122. </td>
  123.  
  124. <td>
  125.  
  126. <a style="text-decoration: none;" href="odcinki.php"><img src="images/odcinki.png" onmouseover="this.src = \'/images/odcinkiP.png\'" onmouseout="this.src = \'/images/odcinki.png\'" border="0"></a>
  127.  
  128. </td>
  129.  
  130. <td>
  131.  
  132. <img src="images/izba.png" onmouseover="this.src = \'/images/izba.png\'" onmouseout="this.src = \'/images/izba.png\'" border="0">
  133.  
  134. </td>
  135.  
  136. </tr>
  137.  
  138.  
  139. </body>
  140.  
  141. </html>

NIE WNIKAŁEM W RESZTE TEGO TABELKOWA...
3lair
moim zdaniem jeśli błąd byłby w kodzie to byś przynajmniej źródło widział, a przesyłasz zdaje sie z kodu php.

ten dodatek, o którym pisałem to web developer toolbar


a powiedz mi jeszcze, żebym się upewnił. jeśli na tej białej stronie klikniesz f5 albo odśwież to się wyświetla?
Arsanael
Dalej białe tło w operze i IE. Po prostu nic sie nie pojawia, sciezki do obrazków są dobre.

3lair
to może bardziej młotkowa metoda. zrób nowy plik i coś w nim napisz. jeśli się wyświetli skopiuj z tego pierwszych 5 linijek, albo np. całą sekcje head. jeśli się przestanie wyświetlać treść znaczy że trzeba w nagłówkach szukać, jeśli nie wklej cześć body itd. przynajmniej będzie wiadomo gdzie jest błąd.
Arsanael
Podzieliłem kod na sekcje head i body, body działa, head juz nie wiec błąd musi być gdzieś tam.

Mam, bląd był trywialny, zabrakło znacznika zamykającego <title> przez co cala strona ładowala sie do tytułu. ;/ sorry za kłopot ;/ i dziekuje wszystkim a takze przepraszam deirathe

Edit2: teraz działa w firefoxie i operze ale w IE dalej jest białe tło, czyżbym popełnił jeszcze jakiś błąd?
3lair
wywal to i sprawdź czy działa:

<meta http-equiv="content-type" content="text/html; charset=utf-8" />

(dalej stawiam, że to problem kodowania)
Spawnm
Przez kodowanie to może nie być polskich znaków, ale nie tła .

css poprawiłeś?
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.