Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> div i jego wysokosc
barF
post
Post #1





Grupa: Zarejestrowani
Postów: 43
Pomógł: 1
Dołączył: 17.01.2006
Skąd: pionowe

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


mam problem z wysokoscia kontenera.
niemoge spasowac zeby dzialalo pod FF i jednoczesnie dla IE

index.html
  1. <body>
  2. <div id="page">
  3. <div id="top"></div>
  4. <div id="content">
  5. <div>
  6. ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel
  7. ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel
  8. ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel
  9. ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel
  10. ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel
  11. ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel
  12. ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel
  13. </div>
  14. </div>
  15. <div id="menu">menu</div>
  16. <div id="footer"></div>
  17. </div>
  18. </body>


i style CSS
  1. html, body {
  2. margin: 15px;
  3. }
  4. body {
  5. background: #a9ac99;
  6. font-size: 13px;
  7. font-family: 'Trebuchet MS', 'Bitstream Vera Sans', Verdana, Arial, 'Lucida Sans', 'Lucida Sans Unicode', Helvetica, sans-serif;
  8. }
  9. #page {
  10. width: 714px;
  11. background: #ffffff url(images/middle.png);
  12. border: 0px solid #000000;
  13. margin: 10px auto;
  14. #height: auto;
  15. }
  16. #top {
  17. height: 15px;
  18. background: url(images/top.png) no-repeat;
  19. }
  20. #content {
  21. width: 400px;
  22. float: left;
  23. padding: 10px 20px 30px;
  24. }
  25. #menu {
  26. width: 230px;
  27. float: left;
  28. }
  29. #footer {
  30. height: 70px;
  31. background: url(images/bottom.png);
  32. #clear: both;
  33. }

jak odkomentuje clear:both; to pod FF dziala dobrze.
niewiem gdzie robie blad (IMG:http://forum.php.pl/style_emoticons/default/dry.gif)
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
mike
post
Post #2





Grupa: Przyjaciele php.pl
Postów: 7 494
Pomógł: 302
Dołączył: 31.03.2004

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


Spróbuj tak:
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3.  
  4. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" >
  5. <head>
  6.  
  7. <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
  8.  
  9. <style type="text/css">
  10. html, body {
  11. margin: 15px;
  12. }
  13. body {
  14. background: #a9ac99;
  15. font-family: normal 13px Trebuchet MS, Bitstream Vera Sans, Verdana, Arial, Lucida Sans, Lucida Sans Unicode, Helvetica, sans-serif;
  16. text-align: center;
  17. }
  18.  
  19. #page {
  20. width: 714px;
  21. background: #ffffff url( 'images/middle.png' );
  22. margin: 10px auto;
  23. overflow: auto;
  24. text-align: left;
  25. }
  26.  
  27. #top {
  28. width: 714px;
  29. height: 15px;
  30. background: url( 'images/top.png' ) no-repeat;
  31. float: left;
  32. }
  33.  
  34. #content {
  35. width: 400px;
  36. float: left;
  37. padding: 10px 20px 30px 20px;
  38. }
  39.  
  40. #menu {
  41. width: 274px;
  42. float: right;
  43. }
  44.  
  45. #footer {
  46. height: 70px;
  47. width: 714px;
  48. background: url(images/bottom.png);
  49. float: left;
  50. }
  51. </style>
  52.  
  53. </head>
  54.  
  55. <body scroll="no">
  56.  
  57. <div id="page">
  58. <div id="top"></div>
  59. <div id="content">
  60. ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel
  61. ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel
  62. ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel
  63. ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel
  64. ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel
  65. ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel
  66. ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel ble bel bel
  67. </div>
  68. <div id="menu">menu</div>
  69. <div id="footer"></div>
  70. </div>
  71.  
  72. </body>
  73. </html>


badzIEwIE może inaczej szerokości bloków wyświetlać, ale to dlatego że inaczej interpretuje padding. Łetwo to zmienisz dodając alternatywne style dla niego.
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 4.10.2025 - 10:20