Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [HTML] Konflikt pomiędzy HTML a BODY, tło dokumentu BODY się nie wyświetla
AboutMe
post
Post #1





Grupa: Zarejestrowani
Postów: 261
Pomógł: 0
Dołączył: 24.02.2008

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


Witam,

Dlaczego po zastosowaniu poniższego kodu:

  1. html { width:100%; height:100%; background:url("img/preloader.gif") no-repeat center center #000000; }
  2. body { margin:0px; padding:0px; background:url("img/bg.jpg") no-repeat; }


plik bg.jpg się nie wyświetla?


Dopiero gdy usuną pierwszą linię stylu dla HTML wtedy tło dla BODY wyświetla się prawidłowo.
Będę wdzięczny za wszelkie porady.

Ten post edytował AboutMe 1.03.2011, 16:23:40
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Kujski
post
Post #2





Grupa: Zarejestrowani
Postów: 105
Pomógł: 14
Dołączył: 28.09.2008
Skąd: W.

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


Tak powinno działać - bynajmnie ja stosuje taki kod (IMG:style_emoticons/default/smile.gif)

  1. background: #fff url(img/bg.jpg) 0 0 no-repeat;


Po drugie:

  1. html { width:100%; height:100%; background:url("img/preloader.gif") no-repeat center center #000000; }


To jest błędne. Do tagu html nie powinno się nic dodawać.

Ten post edytował Kujski 1.03.2011, 17:17:49
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: 9.10.2025 - 03:23