Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [html][css] Niezgodność wersji kodowej przy Operze i MOzilli
poxrimex
post 27.02.2008, 15:08:53
Post #1





Grupa: Zarejestrowani
Postów: 368
Pomógł: 2
Dołączył: 23.09.2007

Ostrzeżenie: (60%)
XXX--


w Operze i Mozilli tekst z diva stopka jest w divie menu

a przyczyną tego jest:
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">


Bez tego działa dobrze pod tymi przeglądarkami

a oto kod:
  1. <div class="menu">ABC</div>
  2. <div class="stopka"><a href="index.php">Kontakt</a></div>


pod Ie działa to prawdłowo

Jeszcze nigdy mi się to nie zdarzyło, tylko tak się dzieje pod tą wersją kodową ;/


--------------------



Go to the top of the page
+Quote Post
grzesiek_g
post 27.02.2008, 15:34:40
Post #2





Grupa: Zarejestrowani
Postów: 249
Pomógł: 30
Dołączył: 18.07.2007

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


Jeśli pod IE działa prawidłowo a pod FF i Operą źle to znaczy, że masz źle napisany kod.

P.S. Od kiedy to DOCTYPE jest stroną kodową (to raczej pojęcie związane z kodowaniem znaków smile.gif )?


--------------------
Warsztat: Ubuntu 12.10, PHPStorm
http://vertoo.pl
Go to the top of the page
+Quote Post
poxrimex
post 27.02.2008, 16:10:55
Post #3





Grupa: Zarejestrowani
Postów: 368
Pomógł: 2
Dołączył: 23.09.2007

Ostrzeżenie: (60%)
XXX--


to nie zmienia faktu, że pod przeglądarkami tymi nie działa ;/

Faktycznie nie nazywa się to wersja kodowa ;D

tylko typ dokumentu coś takiego ;]


--------------------



Go to the top of the page
+Quote Post
grzesiek_g
post 27.02.2008, 16:20:50
Post #4





Grupa: Zarejestrowani
Postów: 249
Pomógł: 30
Dołączył: 18.07.2007

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


Kod HTML to jeszcze nic, coś jest nie tak w CSS-ach, ale niewywróżę tutaj bez linka albo kodu.


--------------------
Warsztat: Ubuntu 12.10, PHPStorm
http://vertoo.pl
Go to the top of the page
+Quote Post
poxrimex
post 27.02.2008, 16:33:48
Post #5





Grupa: Zarejestrowani
Postów: 368
Pomógł: 2
Dołączył: 23.09.2007

Ostrzeżenie: (60%)
XXX--


  1. div.menu
  2. {
  3. clear: both;
  4. width: 778px;
  5. height: 22px;
  6. background-image: url(pasek.gif);
  7. border-style: solid;
  8. border-width: 1px;
  9. border-color: black;
  10. }
  11.  
  12. div.stopka
  13. {
  14. width: 780px;
  15. margin-left: auto;
  16. margin-right: auto;
  17. clear: both;
  18. }


--------------------



Go to the top of the page
+Quote Post
grzesiek_g
post 27.02.2008, 16:51:38
Post #6





Grupa: Zarejestrowani
Postów: 249
Pomógł: 30
Dołączył: 18.07.2007

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


Dla testów rozwinąłem twój kod tak by uzyskać prawidłowy dokument i nie mam takich przypadłości o których piszesz. Na pewno wszystko dobrze pootwierane i pozamykane? Oto mój kod:
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. div.menu
  4. {
  5. clear: both;
  6. width: 778px;
  7. height: 22px;
  8. background-image: url(pasek.gif);
  9. border-style: solid;
  10. border-width: 1px;
  11. border-color: black;
  12. }
  13. div.stopka
  14. {
  15. width: 780px;
  16. margin-left: auto;
  17. margin-right: auto;
  18. clear: both;
  19. }
  20. </head>
  21. <div class="menu">ABC</div>
  22. <div class="stopka"><a href="index.php">Kontakt</a></div>
  23. </body>
  24. </html>

Musi u ciebie działać...


--------------------
Warsztat: Ubuntu 12.10, PHPStorm
http://vertoo.pl
Go to the top of the page
+Quote Post
poxrimex
post 27.02.2008, 16:57:03
Post #7





Grupa: Zarejestrowani
Postów: 368
Pomógł: 2
Dołączył: 23.09.2007

Ostrzeżenie: (60%)
XXX--


zapomniałem napisać, że div stopka jest pod divem top. A w divie top jest div menu.

a oto style dla diva top:

  1. div.top
  2. {
  3. width: 780px;
  4. height: 40px;
  5. margin-left: auto;
  6. margin-right: auto;
  7. }


--------------------



Go to the top of the page
+Quote Post
grzesiek_g
post 27.02.2008, 19:08:19
Post #8





Grupa: Zarejestrowani
Postów: 249
Pomógł: 30
Dołączył: 18.07.2007

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


Nadal jest ok, pokaż cały kod albo linka.


--------------------
Warsztat: Ubuntu 12.10, PHPStorm
http://vertoo.pl
Go to the top of the page
+Quote Post
poxrimex
post 27.02.2008, 19:11:29
Post #9





Grupa: Zarejestrowani
Postów: 368
Pomógł: 2
Dołączył: 23.09.2007

Ostrzeżenie: (60%)
XXX--


  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <link rel="Stylesheet" type="text/css" href="style.css" />
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
  5. <link rel="Shortcut icon" href="ikona.ico" />
  6. </head>
  7.  
  8.  
  9.  
  10. <div class="szare"></div>
  11. <div class="top">
  12. <div class="logo"><a href="abc.html"><img src="logo.gif" style="width: 210px; height: 40px; border: none;"></a></div>
  13. <div class="logoright"><br /><a href="ogowanie.html">Logowanie</a> | <a href="rejestracja.html">Rejestracja</a></div>
  14. <div class="menu">ABC</div>
  15. </div>
  16.  
  17. <div class="stopka"><a href="index.php">Kontakt</a></div>
  18. </body>
  19. </html>


CSS:

  1. html, body
  2. {
  3. margin: 0px;
  4. padding: 0px;
  5. text-align: center;
  6. }
  7.  
  8. div.szare
  9. {
  10. width: 778px;
  11. height: 10px;
  12. overflow: hidden;
  13. margin-left: auto;
  14. margin-right: auto;
  15. border-style: solid;
  16. border-width: 1px;
  17. border-top-width: 0px;
  18. border-color: #d2d2d2;
  19. }
  20.  
  21. div.top
  22. {
  23. width: 780px;
  24. height: 40px;
  25. margin-left: auto;
  26. margin-right: auto;
  27. }
  28.  
  29. div.logo
  30. {
  31. margin-top: 10px;
  32. margin-bottom: 10px;
  33. width: 210px;
  34. height: 40px;
  35. float: left;
  36. }
  37.  
  38. div.logoright
  39. {
  40. margin-top: 10px;
  41. margin-bottom: 10px;
  42. width: 520px;
  43. float: left;
  44. height: 40px;
  45. font-size: 12px;
  46. }
  47.  
  48. div.logoright a
  49. {
  50. color: #5e5e5e;
  51. text-decoration: none;
  52. font-family: Arial, Helvetica, Verdana, sans-serif;
  53. font-size: 12px;
  54. text-decoration: underline;
  55. }
  56.  
  57. div.logoright a:hover
  58. {
  59. color: #315bbd;
  60. }
  61.  
  62. div.menu
  63. {
  64. clear: both;
  65. width: 778px;
  66. height: 22px;
  67. background-image: url(pasek.gif);
  68. border-style: solid;
  69. border-width: 1px;
  70. border-color: #262626;
  71. }
  72.  
  73. div.stopka
  74. {
  75. width: 780px;
  76. margin-left: auto;
  77. margin-right: auto;
  78. clear: both;
  79. }
  80.  
  81. div.stopka a
  82. {
  83. color: #5e5e5e;
  84. text-decoration: none;
  85. }


--------------------



Go to the top of the page
+Quote Post
grzesiek_g
post 27.02.2008, 19:17:26
Post #10





Grupa: Zarejestrowani
Postów: 249
Pomógł: 30
Dołączył: 18.07.2007

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


Zdefiniowałeś height dla div.top. I wszystko jasne - wstaw albo min-height albo powieksz do takiej wartości jaka ma być, albo usuń height.


--------------------
Warsztat: Ubuntu 12.10, PHPStorm
http://vertoo.pl
Go to the top of the page
+Quote Post
poxrimex
post 27.02.2008, 19:23:17
Post #11





Grupa: Zarejestrowani
Postów: 368
Pomógł: 2
Dołączył: 23.09.2007

Ostrzeżenie: (60%)
XXX--


no wkońcu pomogło ^^

Pozdrawiam


--------------------



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 Wersja Lo-Fi Aktualny czas: 5.07.2025 - 20:42