Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [css] Doposanie div do szerkosci
arzach
post
Post #1





Grupa: Zarejestrowani
Postów: 332
Pomógł: 6
Dołączył: 27.11.2008

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


Witam mam taki kod
  1. <style type="text/css">
  2. html, body {
  3.  
  4. margin: 0;
  5. padding: 0;
  6. }
  7.  
  8. #tresc {
  9. width: 1000px;
  10. height:768px;
  11. margin-left:auto;
  12. margin-right:auto;
  13. }
  14.  
  15. #tlo_lewa {
  16. background-image:url('images/01.gif');
  17. background-repeat:repeat-x;
  18. }
  19.  
  20. #tlo_prawa {
  21. background-image:url('images/02.gif');
  22. background-repeat:repeat-x;
  23. }
  24.  
  25.  
  26.  
  27. </head>
  28.  
  29. <div>
  30. <div id="tlo_lewa"></div>
  31. <div id="tresc">
  32. tutaj strona
  33. </div>
  34. <div id="tlo_prawa"></div>
  35. </div>




Div id #tresc ma stałą szerokość i chce by był wyśrodkowany do środka a otaczające go div# tlo_lewa i #tlo_prawa dopasowywały się automatycznie powtarzając obrazek
Obecny kod nie działa

Ten post edytował arzach 20.02.2012, 13:04:42
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
cykcykacz
post
Post #2





Grupa: Zarejestrowani
Postów: 550
Pomógł: 9
Dołączył: 29.05.2009
Skąd: Ostrów Wielkopolski

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


  1. <style type="text/css">
  2. html, body {
  3.  
  4. margin: 0;
  5. padding: 0;
  6. }
  7.  
  8. #tresc {
  9. background-color: green;
  10. width: 1000px;
  11. height:768px;
  12. margin-left:auto;
  13. margin-right:auto;
  14. float: left;
  15. }
  16.  
  17. #tlo_lewa {
  18. background-image:url('images/01.gif');
  19. background-repeat:repeat-x;
  20. background-color: orange;
  21. width: 20px;
  22. height: 20px;
  23. float: left;
  24. }
  25.  
  26. #tlo_prawa {
  27. background-color: pink;
  28. background-image:url('images/02.gif');
  29. background-repeat:repeat-x;
  30. width: 20px;
  31. height: 20px;
  32. float: left;
  33. }
  34.  
  35. </style>


Trzeba nadać tlo_lewa oraz tlo_prawa długość i szerokość spróbuj tereaz (IMG:style_emoticons/default/smile.gif) .

Ten post edytował cykcykacz 20.02.2012, 13:14:48
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: 15.10.2025 - 09:02