Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [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?
Go to the top of the page
+Quote Post
AlexDeLarge
post
Post #2





Grupa: Zarejestrowani
Postów: 85
Pomógł: 14
Dołączył: 14.02.2010

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


Trochę naokoło, ale jest.

  1. <style type="text/css">
  2. #site {
  3. background:none repeat scroll 0 0 green;
  4. left:50%;
  5. margin-left:-458px;
  6. position:absolute;
  7. width:917px;
  8. }


Zdrówka życzę.
Go to the top of the page
+Quote Post
modern-web
post
Post #3





Grupa: Zarejestrowani
Postów: 763
Pomógł: 117
Dołączył: 15.03.2010
Skąd: void

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


Chciałbym zwrócić uwagę, że jest to forum dotyczące skryptów i programowania w języku PHP...
Jeśli chcesz uzyskać porady webmasterskie to zapraszam na strony:

http://www.webcentral.pl/
http://forum.webesteem.pl/
http://www.webmastertalk.pl/

Pozdrawiam.
Go to the top of the page
+Quote Post
desavil
post
Post #4





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

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


Cytat(modern-web @ 20.10.2010, 18:36:28 ) *
Chciałbym zwrócić uwagę, że jest to forum dotyczące skryptów i programowania w języku PHP...
Jeśli chcesz uzyskać porady webmasterskie to zapraszam na strony:

http://www.webcentral.pl/
http://forum.webesteem.pl/
http://www.webmastertalk.pl/

Pozdrawiam.


To po co w takim razie są tagi [html] [css] i inne tego typu co nie dotyczą programowania...?
Go to the top of the page
+Quote Post

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: 22.08.2025 - 15:30