Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [css/html] Problem w Firefox z wyświetlaniem
Forum PHP.pl > Forum > Przedszkole
potreb
Witam, mam problem z wyświetlaniem w firefoxie w IE7 wszystko ładnie działa, problem z float dla diva:

Kod html:
  1. <div id="wrapper">
  2. <div class="wrapper_t">
  3.  
  4. <div id="menu">
  5. <ul id="navigation">
  6. <li><a href="#">Książka telefoniczna</a></li>
  7. <li><a href="#">Serwis międzynarodowy</a></li>
  8. <li><a href="#">Przegląd prasy </a></li>
  9. <li><a href="#">Wydarzenia</a></li>
  10. <li><a href="#">Sprawy socjalne</a></li>
  11. <li><a href="index.php?id=pages">Kadry </a></li>
  12. </ul>
  13. </div>
  14. <div id="content">
  15. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vestibulum turpis leo, condimentum eu, elementum viverra, volutpat a, justo. Ut sodales lorem vel ipsum. Fusce eget ligula. Ut eu pede in tellus interdum consectetuer. Pellentesque vel dui nec nisl posuere facilisis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vivamus massa nibh, molestie non, varius at, facilisis vel, tortor. Phasellus quis arcu hendrerit ipsum posuere condimentum. Maecenas et orci. Donec eu enim eget eros faucibus mattis. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae;
  16. </div>
  17. </div></div>

I CSS:
  1. #wrapper {
  2. background: url('images/wrapper.gif') top left repeat-y #E4E4E4;
  3. width: 817px;
  4. margin: 0 auto;
  5. display: block;
  6. text-align: left;
  7. }
  8.  
  9. .wrapper_t {
  10. text-align: left;
  11. padding: 0px 30px 0 20px;
  12. width: 747px;
  13. }
  14.  
  15. #menu {
  16. width: 206px;
  17. display: block;
  18. text-align: left;
  19. border-right: 1px dashed #e8e8e8;
  20. float: left;
  21. }
  22.  
  23. #content {
  24. width: 506px;
  25. display: block;
  26. text-align: left;
  27. border: 1px dashed #e8e8e8;
  28. padding: 5px;
  29. }


Będe wdzięczny za pomoc.
nevt
spróbuj do #content dodać float:left
potreb
Dla content dałem display: table i pomogło, ale nie wiem czy jest to dobre.

Twoim sposobem działa, ale w firefoxie znikają backgroundy, musiałem po content dać:
<div>&nbsp;&nbsp;&nbsp;</div>, żeby poprawnie wyświetlało, chyba że dla wrapper wtedy będę musiał ustawić wysokość dla wrapper automatyczną ale nie wiem czy tak ma być
siemakuba
Spróbuj dać float o którym pisze @nevt i do tego, do elementów które mają float ustawione dać jeszcze overflow:auto;

pozdr.
nevt
po #content dodaj
  1. <div style="clear:both"></div>

i #wrapper powinien rozciągać się tak jak należy...
potreb
Okey dzięki chłopaki, oba sposoby jakby nie było są okey. Pozdro
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.