Arsanael
22.10.2009, 11:13:20
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
22.10.2009, 11:21:48
Najlepiej jak byś podał kod, tak w ciemno trudno powiedzieć ja stawiam na złą deklarację strony
deirathe
22.10.2009, 11:37:06
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
Arsanael
22.10.2009, 11:44:53
<?php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3c.org/1999/xhtml" xml:lang="pl" lang="pl">
<head>
<link rel="Shortcut icon" href="images/hicon.ico" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title> <title>
<style type="text/css">
#div {
margin: 0 auto;
padding-top: 0.2em;
line-height: 1.25
position: relative; top: 50px;
margin: 0;
}
.strona {
width:900px;
border: 1px solid #C0C0C0;
margin-left: auto;
margin-right: auto;
cursor: default;
margin-top: -9px;
background-image:url("images/tlo.JPG");
}
</style>
</head>';
<div class="strona ">
<center>
<table height="200" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top: -5px;">
<tr>
<td>
<center><img src="images/banner.PNG"></center>
</td>
</tr>
</table>
<table width="750" height="43" background="/images/top_belka.png" align="center" border="0" cellpadding="0" cellspacing="0" style="margin-top: -6px;">
<tr align="center">
<td>
<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>
</td>
<td>
<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>
</td>
<td>
<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>
</td>
<td>
<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>
</td>
<td>
<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>
</td>
<td>
<img src="images/izba.png" onmouseover="this.src = \'/images/izba.png\'" onmouseout="this.src = \'/images/izba.png\'" border="0">
</td>
</tr>
</table>';
?>
Takie coś mam, coś jest źle?
3lair
22.10.2009, 11:46:14
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
22.10.2009, 11:48:14
Dużo!! gdzie tag body? Czemu pierwszą linie wysyłasz pustą? Gdzie zakończenie html'a?

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
22.10.2009, 11:53:38
<?php
print '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3c.org/1999/xhtml" xml:lang="pl" lang="pl">
<head>
<link rel="Shortcut icon" href="images/hicon.ico" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title><title>
<style type="text/css">
#div {
margin: 0 auto;
padding-top: 0.2em;
line-height: 1.25
position: relative; top: 50px;
margin: 0;
}
@font-face {
font-family: "Capture it";
src: url("/fonts/Capture it.ttf");
}
.strona {
width:900px;
border: 1px solid #C0C0C0;
margin-left: auto;
margin-right: auto;
cursor: default;
margin-top: -9px;
background-image:url("images/tlo.JPG");
}
</style>
</head>';
<body>
<div class="strona ">
<center>
<table height="200" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top: -5px;">
<tr>
<td>
<center><img src="images/banner.PNG"></center>
</td>
</tr>
</table>
<table width="750" height="43" background="/images/top_belka.png" align="center" border="0" cellpadding="0" cellspacing="0" style="margin-top: -6px;">
<tr align="center">
<td>
<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>
</td>
<td>
<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>
</td>
<td>
<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>
</td>
<td>
<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>
</td>
<td>
<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>
</td>
<td>
<img src="images/izba.png" onmouseover="this.src = \'/images/izba.png\'" onmouseout="this.src = \'/images/izba.png\'" border="0">
</td>
</tr>
</table>
</body>
</html>';
?>
Lepiej? masz juz znaczniki html i body, strona dalej nie działa.
Spawnm
22.10.2009, 12:10:28
padding-top: 0.2em;
line-height: 1.25
position: relative; top: 50px;
masz kilka literówek, popraw je, wtedy pewnie zacznie działać.
deirathe
22.10.2009, 12:10:31
To że swój kod poprawiasz to nie robisz mi tym łaski... Sprawdź ścieżki do obrazkow a tu masz swojego html poniżej:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3c.org/1999/xhtml" xml:lang="pl" lang="pl">
<link rel="Shortcut icon" href="images/hicon.ico" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
div {
margin: 0 auto;
padding-top: 0.2em;
line-height: 1.25
position: relative; top: 50px;
margin: 0;
}
@font-face {
font-family: "Capture it";
src: url("/fonts/Capture it.ttf");
}
.strona {
width:900px;
border: 1px solid C0C0C0;
margin-left: auto;
margin-right: auto;
cursor: default;
margin-top: -9px;
background-image:url("images/tlo.JPG");
}
<table height="200" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top: -5px;">
<table width="750" height="43" background="/images/top_belka.png" align="center" border="0" cellpadding="0" cellspacing="0" style="margin-top: -6px;">
<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>
<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>
<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>
<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>
<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>
<img src="images/izba.png" onmouseover="this.src = \'/images/izba.png\'" onmouseout="this.src = \'/images/izba.png\'" border="0">
NIE WNIKAŁEM W RESZTE TEGO TABELKOWA...
3lair
22.10.2009, 12:23:12
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
22.10.2009, 12:26:12
Dalej białe tło w operze i IE. Po prostu nic sie nie pojawia, sciezki do obrazków są dobre.
3lair
22.10.2009, 12:30:57
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
22.10.2009, 12:44:46
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
22.10.2009, 14:02:29
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
22.10.2009, 14:04:27
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.