Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [CSS][HTML] Div w Div obok siebie - wysokość
desavil
post
Post #1





Grupa: Zarejestrowani
Postów: 339
Pomógł: 3
Dołączył: 15.10.2008
Skąd: Internet

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


Witam,

Kod HTML
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  4. <link href="style.css" rel="stylesheet" type="text/css" />
  5. </head>
  6.  
  7. <div id="site">
  8. <div id="site-left">a<br />a</div>
  9. <div id="site-right">b<br />b</div>
  10. </div>
  11.  
  12. </body>
  13. </html>

Kod CSS:
  1. @charset "utf-8";
  2. html, body {
  3. width:100%;
  4. height:100%;
  5. padding:0;
  6. margin:0;
  7. background:#000000;
  8. background-image: url(images/bg.png);
  9. background-repeat:no-repeat;
  10. background-position:center center;
  11. background-attachment:fixed;
  12. -o-background-size: 100% 100%, auto;
  13. -moz-background-size: 100% 100%, auto;
  14. -webkit-background-size: 100% 100%, auto;
  15. background-size: 100% 100%, auto;
  16. }
  17.  
  18. #site{
  19. width: 917px;
  20. position: relative;
  21. margin: 0 auto;
  22. background: green;
  23. }
  24.  
  25. #site-left{
  26. width: 50px;
  27. float: left;
  28. height: 100px;
  29. background: yellow;
  30. }
  31.  
  32. #site-right{
  33. width: 50px;
  34. float: right;
  35. background: red;
  36. }


Mój problem polega na tym iż div z tłem zielonym (site) nie rozszerza się automatycznie i go w ogóle nie widać. W czym tkwi problem?


--------------------
"Nie ma głupich pytań, są tylko głupie odpowiedzi."
Pomogłem?? Kliknij "Pomógł" :) Dzięki!
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 Aktualny czas: 22.08.2025 - 07:24