Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [HTML][CSS] CSS+DIV pierwsze kroki
Rastman
post 17.12.2010, 19:00:44
Post #1





Grupa: Zarejestrowani
Postów: 177
Pomógł: 0
Dołączył: 6.06.2004

Ostrzeżenie: (20%)
X----


Witam,
zaczynam przygodę z CSS+DIV. Wcześniej robiłem wszystko na tabelach. Mam poniższy kod:

plik css

  1. html, body
  2. {
  3. background: url(images/strony_internetowe_tlo.jpg);
  4. width: 1000px;
  5. margin: 0px 0px 0px 0px;
  6. }
  7. div#main
  8. {
  9. width: 950px;
  10. height: 500px;
  11. text-align: center;
  12. position: absolute;
  13. left: 50%; margin-left: -475px;
  14. }
  15. div#top
  16. {
  17. background: Yellow;
  18. width: 950px;
  19. height: 50px;
  20. text-align: center;
  21. position: absolute;
  22. left: 0%; margin-left: 0px;
  23. }
  24. div#left
  25. {
  26. background: Black;
  27. width: 50px;
  28. height: 100%;
  29. text-align: center;
  30. position: static;
  31. left: 0%;
  32. margin-left: 0px;
  33. top: 50px;
  34. float: left;
  35. }
  36. div#right
  37. {
  38. background: blue;
  39. width: 50px;
  40. height: 100%;
  41. text-align: center;
  42. position: static;
  43. top: 50px;
  44. float: left;
  45. }
  46. div#content
  47. {
  48. background: fuchsia;
  49. width: 850px;
  50. height: 100%;
  51. text-align: center;
  52. position: static;
  53. top: 50px;
  54. float: left;
  55. }
  56. div#footer
  57. {
  58. background: #b22222;
  59. width: 850px;
  60. height: 50px;
  61. text-align: center;
  62. position: static;
  63. float: left;
  64. vertical-align: baseline;
  65. left: 0px;
  66. }
  67. div#substance
  68. {
  69. background: aqua;
  70. width: 850px;
  71. text-align: center;
  72. position: static;
  73. float: left;
  74. height: auto;
  75. left:0px;
  76. vertical-align: baseline;
  77. }


plik html

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <head>
  3. <meta http-equiv="content-type" content="text/html; charset=windows-1250">
  4. <meta name="generator" content="PSPad editor, www.pspad.com">
  5. <link rel="stylesheet" href="style.css">
  6.  
  7. </head>
  8. <body>
  9. <div id="main">
  10. <div id="top">
  11. <p>top</p>
  12. </div>
  13. <div id="left">
  14. <p>l</p>
  15. </div>
  16. <div id="content">
  17. <div id="substance">
  18. <p>substance</p>
  19. </div>
  20. <div id="footer">
  21. <p>footer</p>
  22. </div>
  23. </div>
  24. <div id="right">
  25. <p>r</p>
  26. </div>
  27. </div>
  28.  
  29. </body>
  30. </html>
  31.  


czemu tylko w divach top i footer wyświetlana jest jakakolwiek zawartość? Jak zrobić, aby div substance wypełniał całą zawartość diva content minus footer?
z góry dzięki wielkie za pomoc


--------------------
Go to the top of the page
+Quote Post

Posty w temacie


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: 19.06.2025 - 14:54