Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [CSS]Dwa, wycentrowane divy obok siebie
mateŁusz
post
Post #1





Grupa: Zarejestrowani
Postów: 102
Pomógł: 0
Dołączył: 21.08.2012

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


A więc mam już dwa divy wyśrodkowane, lecz są one jeden pod drugim. Powinny być obok siebie i między nimi odstęp, np. 10 px.

CSS:
  1. .fanpage {
  2. width: 250px;
  3. height: 350px;
  4. border: 1px solid #550023;
  5. background-color: #750042;
  6. position: relative;
  7. margin: 0 auto;
  8. }
  9.  
  10. .fanpage_naglowek {
  11. width: 250px;
  12. height: 30px;
  13. background-image: url(images/naglowekfp.png);
  14. background-repeat: no-repeat;
  15.  
  16. }
  17.  
  18.  
  19. .fanpage1 {
  20. width: 250px;
  21. height: 350px;
  22. border: 1px solid #550023;
  23. background-color: #750042;
  24. margin: 0 auto;
  25. position: relative;
  26.  
  27.  
  28.  
  29. }
  30.  
  31. .fanpage1_naglowek {
  32. width: 250px;
  33. height: 30px;
  34. background-image: url(images/naglowekfp1.png);
  35. background-repeat: no-repeat;
  36.  
  37. }
  38.  
  39.  
  40.  
  41. .stala {
  42.  
  43. margin-left: auto;
  44. margin-right: auto;
  45.  
  46.  
  47. }


HTML
  1. <div class="stala">
  2. <div class="fanpage"><div class="fanpage_naglowek"></div>
  3. </div>
  4. <div class="fanpage1"><div class="fanpage1_naglowek"></div>
  5. </div>
  6. </div>


Jak do przerobić, aby było dobrze? (IMG:style_emoticons/default/biggrin.gif)

DIV 1 | DIV 2
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: 22.08.2025 - 17:52