Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [css/html] Problem w Firefox z wyświetlaniem
potreb
post 19.03.2008, 10:24:48
Post #1





Grupa: Zarejestrowani
Postów: 1 568
Pomógł: 192
Dołączył: 7.03.2005
Skąd: Warszawa

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


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.

Ten post edytował potreb 19.03.2008, 12:57:16


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

Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 5)
nevt
post 19.03.2008, 10:28:32
Post #2





Grupa: Przyjaciele php.pl
Postów: 1 595
Pomógł: 282
Dołączył: 24.09.2007
Skąd: Reda, Pomorskie.

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


spróbuj do #content dodać float:left


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

-
Oh no, my young coder. You will find that it is you who are mistaken, about a great many things... -
Go to the top of the page
+Quote Post
potreb
post 19.03.2008, 10:50:23
Post #3





Grupa: Zarejestrowani
Postów: 1 568
Pomógł: 192
Dołączył: 7.03.2005
Skąd: Warszawa

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


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ć

Ten post edytował potreb 19.03.2008, 10:54:34


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

Go to the top of the page
+Quote Post
siemakuba
post 19.03.2008, 11:00:19
Post #4





Grupa: Przyjaciele php.pl
Postów: 1 112
Pomógł: 20
Dołączył: 10.04.2005

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


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.
Go to the top of the page
+Quote Post
nevt
post 19.03.2008, 11:52:36
Post #5





Grupa: Przyjaciele php.pl
Postów: 1 595
Pomógł: 282
Dołączył: 24.09.2007
Skąd: Reda, Pomorskie.

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


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

i #wrapper powinien rozciągać się tak jak należy...


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

-
Oh no, my young coder. You will find that it is you who are mistaken, about a great many things... -
Go to the top of the page
+Quote Post
potreb
post 19.03.2008, 12:56:47
Post #6





Grupa: Zarejestrowani
Postów: 1 568
Pomógł: 192
Dołączył: 7.03.2005
Skąd: Warszawa

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


Okey dzięki chłopaki, oba sposoby jakby nie było są okey. Pozdro


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

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: 31.07.2025 - 07:30