Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [CSS]Przeniesienie diva pod inne divy
kurczak610
post 26.07.2011, 08:11:24
Post #1





Grupa: Zarejestrowani
Postów: 87
Pomógł: 2
Dołączył: 3.05.2009

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


Witam, mam coś takiego
  1. <div id="menuleft">Tekst po lewej stronie</div>
  2. <div id="center">Tekst po środku</div>
  3. <div id="menuright">Tekst po prawej stronie</div>
  4. <div id="footer">Stopka</div>


Chciałbym aby stopka była pod tymi 3 divami, a gdy mam tak ona jest w ich miejscu ale tak jakby miała ustawiony z-index mniejszy niż tamte.
CSS:
  1. #menuleft {
  2. background: #000000;
  3. width: 150px;
  4. text-align: center;
  5. position: absolute;
  6. }
  7. #menuright {
  8. background: #000000;
  9. width: 150px;
  10. text-align: center;
  11. position: absolute;
  12. margin-left:850px;
  13. }
  14. #center {
  15. background: #000000;
  16. width: 680px;
  17. text-align: center;
  18. position: absolute;
  19. margin-left: 160px;
  20.  
  21. }
  22.  
  23. #footer {
  24. position: absolute;
  25. width:980px;
  26. background: #000000;
  27. text-align:center;
  28. }


Pozdrawiam i z góry dzięki

Ten post edytował kurczak610 26.07.2011, 08:12:29
Go to the top of the page
+Quote Post
jacobson
post 26.07.2011, 08:35:08
Post #2





Grupa: Zarejestrowani
Postów: 468
Pomógł: 36
Dołączył: 14.12.2010

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


ja to sadze ze wystarczy dodac float...
menu left jako ze jest pierwsze od lewej daj
clear:left;
float:left;

content daj samo float:left;

tam cos masz z prawej to tez float:left;
a zeby footer zszedl pod nie to daj mu
clear:left;
float:left;

no i oczywiscie z tych co napisales usun position: absolute; i te marginesy z kosmosu.

Ten post edytował jacobson 26.07.2011, 08:41:11
Go to the top of the page
+Quote Post
kurczak610
post 26.07.2011, 08:41:58
Post #3





Grupa: Zarejestrowani
Postów: 87
Pomógł: 2
Dołączył: 3.05.2009

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


Nie pomogło ;/
Go to the top of the page
+Quote Post
kudlatypawelek
post 26.07.2011, 08:48:11
Post #4





Grupa: Zarejestrowani
Postów: 46
Pomógł: 5
Dołączył: 30.06.2011

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


  1. #menuleft {
  2. background: #000000;
  3. width: 150px;
  4. text-align: center;
  5. float: left;
  6. }
  7.  
  8. #center {
  9. background: #000000;
  10. width: 680px;
  11. text-align: center;
  12. float: left;
  13.  
  14. }
  15. #menuright {
  16. background: #000000;
  17. width: 150px;
  18. text-align: center;
  19. float: left;
  20. }
  21.  
  22. #footer {
  23. width:980px;
  24. background: #000000;
  25. text-align:center;
  26. }


  1. <div id="menuleft">Tekst po lewej stronie</div>
  2. <div id="center">Tekst po środku</div>
  3. <div id="menuright">Tekst po prawej stronie</div>
  4. <div style="clear: both"></div>
  5. <div id="footer">Stopka</div>
Go to the top of the page
+Quote Post
jacobson
post 26.07.2011, 08:49:50
Post #5





Grupa: Zarejestrowani
Postów: 468
Pomógł: 36
Dołączył: 14.12.2010

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


albo bez dodatkowego diva

  1. #menuleft {
  2. background: #000000;
  3. width: 150px;
  4. text-align: center;
  5. float: left;
  6. }
  7.  
  8. #center {
  9. background: #000000;
  10. width: 680px;
  11. text-align: center;
  12. float: left;
  13.  
  14. }
  15. #menuright {
  16. background: #000000;
  17. width: 150px;
  18. text-align: center;
  19. float: left;
  20. }
  21.  
  22. #footer {
  23. width:980px;
  24. background: #000000;
  25. text-align:center;
  26. clear:left;
  27. }
Go to the top of the page
+Quote Post
kurczak610
post 26.07.2011, 08:54:43
Post #6





Grupa: Zarejestrowani
Postów: 87
Pomógł: 2
Dołączył: 3.05.2009

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


Dzięki smile.gif
Go to the top of the page
+Quote Post

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: 30.04.2025 - 07:35