Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [CSS]dziwne zachowanie w IE
Forum PHP.pl > Forum > Przedszkole
Michał90
Witam,
Zrobiłem sobie taki mały szablonik na div;ach + css(dopiero się ucze)
I w FF strona wyświetla się prawidłowo, zaś w IE już nie..

Strona FF


Strona IE


Chodzi o to, że w FF środek strony jest na środku (taka tabelka-obramowanie), natomiast w IE ten środek dolgea do prawe jstrony ekranu tak jakby nie była wycentrowana + jest odstęp na dole między obramowaniem...

Tak wygląda index.html
  1. <link rel ="stylesheet" href ="style.css" type ="text/css" />
  2. </head>
  3.  
  4. <div id="top"></div>
  5. <div id="all">
  6. <div id="srodek">fgffffffffffffffffffffffff<br><a href="http://...pl">ggg</a></div>
  7. </div>
  8. <div id="footer">td</div>
  9. </body>
  10. </html>


css:
  1. *{
  2. color : #000000;
  3. background-color: #ffffff;
  4. font-family : arial;
  5. font-size : 12px;
  6. margin:0px;
  7. padding:0px;
  8. border:none;
  9. }
  10. a {
  11. color : #6e9bba;
  12. text-decoration : none;
  13. }
  14. a:hover{color:#176fae;}
  15. #top{
  16. background-image : url('images/test1.jpg');
  17. background-repeat : repeat -x;
  18. height:200px;
  19. width:100%;
  20. clear:both;
  21. }
  22. #all{
  23. margin:0 auto;
  24. height:100%;
  25. width:760px;
  26. margin-bottom:8px;
  27. clear:both;
  28. }
  29. #srodek{
  30. border: 4px solid #bcbaca;
  31. height:100%;
  32. width:760px;
  33. }
  34. #footer{
  35. background-image : url('images/dol1.jpg');
  36. background-repeat : repeat -x;
  37. height:90px;
  38. width:100%;
  39. clear:both;
  40. }


Jak to naprawić?

Pozdrawiam
_olo_1984
dać na początku deklaracę dokumentu np.
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


poza tym dla body margin: 0 auto;
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.