Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [HTML][CSS] Problem z IE 6.0
Forum PHP.pl > Forum > Przedszkole
krzychu0808
Witam....
Mam problem robie sobie szablon allegro i napotkałem pewien problem gdy podlinkowałem elementy grafiki pomiędzy nimi powstał odstęp ale ten odstęp jest tylko w IE 6.0 a w Mozilla Firefox nie ma tego...
Link do szablonu

  1. <head>
  2. <style type="text/css">
  3. body {background-color: #202632;}
  4.  
  5. #strona {
  6. margin : auto;
  7. padding : 0px;
  8. width : 862px;
  9. }
  10. #heder1 {
  11. margin : auto;
  12. padding : 0px;
  13. width : 611px;
  14. height : 227px;
  15. float : left;
  16. background : url(http://www.elaz.eu/allegro/rapid/images1/1_04.gif)
  17. }
  18. #heder2 {
  19. margin : auto;
  20. padding : 0px;
  21. width : 170px;
  22. height : 227px;
  23. float : left;
  24. }
  25. #heder3 {
  26. margin : auto;
  27. padding : 0px;
  28. width : 81px;
  29. height : 227px;
  30. float : left;
  31. background : url(http://www.elaz.eu/allegro/rapid/images1/1_06.gif)
  32. }
  33.  
  34. </style>
  35. </head>
  36. <body>
  37. <div id="strona">
  38. <div id="heder1"></div>
  39. <div id="heder2">
  40. <img src="http://www.elaz.eu/allegro/rapid/images1/1_05.gif" border="0">
  41. <a href="index.html"><img src="http://www.elaz.eu/allegro/rapid/images1/1_07.gif" border="0"></a>
  42. <a href="index.html"><img src="http://www.elaz.eu/allegro/rapid/images1/1_08.gif" border="0"></a>
  43. <a href="index.html"><img src="http://www.elaz.eu/allegro/rapid/images1/1_09.gif" border="0"></a>
  44. <a href="index.html"><img src="http://www.elaz.eu/allegro/rapid/images1/1_10.gif" border="0"></a>
  45. <a href="index.html"><img src="http://www.elaz.eu/allegro/rapid/images1/1_11.gif" border="0"></a>
  46. <img src="http://www.elaz.eu/allegro/rapid/images1/1_12.gif" border="0">
  47. </div>
  48. <div id="heder3"></div>
  49.  
  50. </div>
  51. </body>
  52. </html>


Proszę o pomoc...
nevt
dodaj do stylów:

Kod
a, a img {padding: 0; margin:0}
piotrekkr
Możliwe że pomoże też nadanie
  1. a img {display:inline}
.
krzychu0808
Zrobiłem coś takiego

  1. <head>
  2. <style type="text/css">
  3. body {background-color: #202632;}
  4. a img {
  5. padding: 0;
  6. margin:0;
  7. display: inline;
  8. }
  9. #strona {
  10. margin : auto;
  11. padding : 0px;
  12. width : 862px;
  13. }
  14. #heder1 {
  15. margin : auto;
  16. padding : 0px;
  17. width : 611px;
  18. height : 227px;
  19. float : left;
  20. background : url(http://www.elaz.eu/allegro/rapid/images1/1_04.gif)
  21. }
  22. #heder2 {
  23. margin : auto;
  24. padding : 0px;
  25. width : 170px;
  26. height : 227px;
  27. float : left;
  28. }
  29. #heder3 {
  30. margin : auto;
  31. padding : 0px;
  32. width : 81px;
  33. height : 227px;
  34. float : left;
  35. background : url(http://www.elaz.eu/allegro/rapid/images1/1_06.gif)
  36. }
  37.  
  38. </style>
  39. </head>
  40. <body>
  41. <div id="strona">
  42. <div id="heder1"></div>
  43. <div id="heder2">
  44. <img src="http://www.elaz.eu/allegro/rapid/images1/1_05.gif" border="0">
  45. <a href="index.html"><img src="http://www.elaz.eu/allegro/rapid/images1/1_07.gif" border="0"></a>
  46. <a href="index.html"><img src="http://www.elaz.eu/allegro/rapid/images1/1_08.gif" border="0"></a>
  47. <a href="index.html"><img src="http://www.elaz.eu/allegro/rapid/images1/1_09.gif" border="0"></a>
  48. <a href="index.html"><img src="http://www.elaz.eu/allegro/rapid/images1/1_10.gif" border="0"></a>
  49. <a href="index.html"><img src="http://www.elaz.eu/allegro/rapid/images1/1_11.gif" border="0"></a>
  50. <img src="http://www.elaz.eu/allegro/rapid/images1/1_12.gif" border="0">
  51. </div>
  52. <div id="heder3"></div>
  53.  
  54. </div>
  55. </body>
  56. </html>


Ale niestety nic to nie dało.... ma ktoś jakiś pomysł może błąd gdzieś zrobiłem... proszę o pomoc
l0ud
(do pierwszej wersji). Dodaj wyświetlanie blokowe obrazkom w tej warstwie smile.gif

Kod
div#heder2 img {
    display: block;
}
krzychu0808
Wielkie dzięki.... ale mam jeszcze jeden problem w IE 6.0 nie wyśrodkowuje mi tej głównej tabeli

Zrobiłem tak:

  1. <head>
  2. <style type="text/css">
  3. body {background-color: #202632;}
  4.  
  5.  
  6. div#heder2 img {
  7. display: block;
  8. }
  9.  
  10. #strona {
  11. margin : auto;
  12. padding : 0px;
  13. width : 862px;
  14. }
  15. #heder1 {
  16. margin : auto;
  17. padding : 0px;
  18. width : 611px;
  19. height : 227px;
  20. float : left;
  21. background : url(http://www.elaz.eu/allegro/rapid/images1/1_04.gif)
  22. }
  23. #heder2 {
  24. margin : auto;
  25. padding : 0px;
  26. width : 170px;
  27. height : 227px;
  28. float : left;
  29. }
  30. #heder3 {
  31. margin : auto;
  32. padding : 0px;
  33. width : 81px;
  34. height : 227px;
  35. float : left;
  36. background : url(http://www.elaz.eu/allegro/rapid/images1/1_06.gif)
  37. }
  38.  
  39. </style>
  40. </head>
  41. <body>
  42. <div id="strona">
  43. <div id="heder1"></div>
  44. <div id="heder2">
  45. <img src="http://www.elaz.eu/allegro/rapid/images1/1_05.gif" border="0">
  46. <a href="index.html"><img src="http://www.elaz.eu/allegro/rapid/images1/1_07.gif" border="0"></a>
  47. <a href="index.html"><img src="http://www.elaz.eu/allegro/rapid/images1/1_08.gif" border="0"></a>
  48. <a href="index.html"><img src="http://www.elaz.eu/allegro/rapid/images1/1_09.gif" border="0"></a>
  49. <a href="index.html"><img src="http://www.elaz.eu/allegro/rapid/images1/1_10.gif" border="0"></a>
  50. <a href="index.html"><img src="http://www.elaz.eu/allegro/rapid/images1/1_11.gif" border="0"></a>
  51. <img src="http://www.elaz.eu/allegro/rapid/images1/1_12.gif" border="0">
  52. </div>
  53. <div id="heder3"></div>
  54.  
  55. </div>
  56. </body>
  57. </html>


Jestem początkujący jeżeli widzi ktoś jeszcze jakieś błędy w kodzie to proszę napisać...
l0ud
Dodaj doctype (przed <html>):
Kod
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">


albo bardziej restrykcyjny strict, jeżeli będziesz umiał się do niego stosować winksmiley.jpg

Kod
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
gnowak
Prawidłowy plik html według w3c.org 1 warning o typu encoding (No Character Encoding Found! Falling back to UTF-8.).



I tak jak l0ud zaproponował. Główna tabela teraz jest wyśrodkowana.

Kod
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
  <head>
      
      <title>Tytuł strony</title>
    <style type="text/css">
      body {background-color: #202632;}
            div#heder2 img {
                    display: block;
            }
            
            #strona {
                    margin     : auto;
                    padding    : 0px;
                    width      : 862px;
            }
            #heder1 {
                    margin     : auto;
                    padding    : 0px;
                    width      : 611px;
                    height       : 227px;
                    float        : left;
                    background     : url(http://www.elaz.eu/allegro/rapid/images1/1_04.gif)
            }
            #heder2 {
                    margin     : auto;
                    padding    : 0px;
                    width      : 170px;
                    height       : 227px;
                    float        : left;
            }
            #heder3 {
                    margin     : auto;
                    padding    : 0px;
                    width      : 81px;
                    height       : 227px;
                    float        : left;
                    background     : url(http://www.elaz.eu/allegro/rapid/images1/1_06.gif)
            }
                        
        </style>
  </head>
  <body>
    <div id="strona">
    <div id="heder1"></div>
    <div id="heder2">
    <img src="http://www.elaz.eu/allegro/rapid/images1/1_05.gif" border="0" alt="img">
    <a href="index.html"><img src="http://www.elaz.eu/allegro/rapid/images1/1_07.gif" border="0" alt="img"></a>
    <a href="index.html"><img src="http://www.elaz.eu/allegro/rapid/images1/1_08.gif" border="0" alt="img"></a>
    <a href="index.html"><img src="http://www.elaz.eu/allegro/rapid/images1/1_09.gif" border="0" alt="img"></a>
    <a href="index.html"><img src="http://www.elaz.eu/allegro/rapid/images1/1_10.gif" border="0" alt="img"></a>
    <a href="index.html"><img src="http://www.elaz.eu/allegro/rapid/images1/1_11.gif" border="0" alt="img"></a>
    <img src="http://www.elaz.eu/allegro/rapid/images1/1_12.gif" border="0" alt="img">
    </div>
    <div id="heder3"></div>
    
    </div>
  </body>
</html>
krzychu0808
to będziesz szablon allegro więc "<title>Tytuł strony</title>" niepotrzebne....
gnowak
OK, ale

  1. alt="img"


tak winksmiley.jpg
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.