Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP][HTML]Niepotrzeby odstęp
sirostr
post
Post #1





Grupa: Zarejestrowani
Postów: 40
Pomógł: 1
Dołączył: 29.01.2008
Skąd: Wielkopolska

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


Mam taki kod (view.php):
  1. <!DOCTYPE html
  2. PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7. <meta name="Description" content="<?=$desc?>" />
  8. <meta name="Keywords" content="<?=$keywords?>" />
  9. <meta name="Generator" content="<?=$generator?>" />
  10. <meta name="Robots" content="<?=$robots?>" />
  11. <meta name="Author" content="<?=$autor?>" />
  12. <title><?=$tytul_strony?></title>
  13. </head>
  14. <body>
  15. <h1><?=$nazwa_portalu?></h1>
  16. <div id="side">
  17. <h3>Menu</h3>
  18. <ul>
  19. <?php $cms->menu('menu'); ?>
  20. </ul>
  21. </div>
  22. <div id="content">
  23. <h3><?=$tytul_tresc?></h3>
  24. <?=$tresc?>
  25. </div>
  26. </body>
  27. </html>


I w Firefoksie wywołany wygląda tak:
  1. <!DOCTYPE html
  2. PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <meta name="Description" content="sirostr CMS" />
  7. <meta name="Keywords" content="sirostr CMS" />
  8. <meta name="Generator" content="sirostr CMS" />
  9. <meta name="Robots" content="all" />
  10. <meta name="Author" content="sirostr" />
  11. <title>sdfsdf - sirostr CMS</title>
  12.  
  13. </head>
  14. <h1>nazwa_portalu</h1>
  15. <div id="side">
  16. <h3>Menu</h3>
  17. <ul>
  18. <li><a href="dsfsdf">sdfsf</a></li></ul>
  19. </div>
  20. <div id="content">
  21. <h3>sdfsdf</h3>
  22. </div>
  23.  
  24. </body>
  25.  
  26. </html>

A w Operze tak:
  1. <!DOCTYPE html
  2. PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <meta name="Description" content="sirostr CMS" />
  7. <meta name="Keywords" content="sirostr CMS" />
  8. <meta name="Generator" content="sirostr CMS" />
  9. <meta name="Robots" content="all" />
  10. <meta name="Author" content="sirostr" />
  11. <title>sdfsdf - sirostr CMS</title>
  12. </head>
  13. <h1>nazwa_portalu</h1>
  14. <div id="side">
  15. <h3>Menu</h3>
  16. <ul>
  17. <li><a href="dsfsdf">sdfsf</a></li></ul>
  18. </div>
  19. <div id="content">
  20. <h3>sdfsdf</h3>
  21. </div>
  22. </body>
  23. </html>


Jak widać w Firefoksie po </title> jest niepotrzebny odstęp, przez co strona jest przesunięta w dół.
Czy ktoś mógłby mi wyjaśnić czemu tak się dzieje?

Ten post edytował sirostr 11.08.2008, 17:52:28
Go to the top of the page
+Quote Post
ferrero2
post
Post #2





Grupa: Zarejestrowani
Postów: 171
Pomógł: 32
Dołączył: 5.08.2008
Skąd: Lublin

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


Pokaż plik ze stylami css.
Najczęstrzym problemem jest brak ustawienia margin:0; oraz padding:0; dla elemntów body html.
Dlatego potrzebny jest css


--------------------
---------------------------
"Jeżeli trzeci dzień z rzędu nie chce Ci się pracować tzn że dziś jest ŚRODA !
Algorytmy , Programowanie , Tworzenie WWW - SPRAWDŹ
Go to the top of the page
+Quote Post
sirostr
post
Post #3





Grupa: Zarejestrowani
Postów: 40
Pomógł: 1
Dołączył: 29.01.2008
Skąd: Wielkopolska

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


Tutaj nie chodzi o style.
Style nie generują kodu.

BTW: ile może być zmiennych sesji?
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 19.08.2025 - 15:40