Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Warstwy w css
urbizdw
post
Post #1





Grupa: Zarejestrowani
Postów: 40
Pomógł: 0
Dołączył: 24.05.2004

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


  1. body{
  2. background-color:#FFFFFF;
  3. }
  4. .srodek{
  5. margin: 0 auto;
  6. text-align: center;
  7. }
  8. .logo{
  9. width: 785px;
  10. height: 289px;
  11. background: url('logo.png') no-repeat;
  12. background-position: top center;
  13. margin: 0 auto;
  14. text-align:center;
  15. z-index:1;
  16. }
  17. .internet{
  18. background-image:url(internet.png);
  19. width:45px;
  20. height:122px;
  21. margin-left:500px;
  22. z-index:0;
  23. }


  1. <div class="srodek">
  2. <div class="logo">
  3. <div class="internet"></div>
  4. </div>
  5. </div>


Tak wyglada

A jak przerobic by przycisk byl pod logiem? Prosze o odpowiedz
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
pawkow
post
Post #2





Grupa: Zarejestrowani
Postów: 76
Pomógł: 7
Dołączył: 30.09.2006

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


div.menu_top wypozycjonuj absolutnie po prostu, o ile dobrze zrozumiałem Twój problem nie będzie z tym większych problemów. Nadaj div.logo position relative a div.menu_top absolute i sie baw.

Ewentualnie, jest fajny myk na pozycjonowanie divów z absolute na środku ekranu - ujemne marginesy.

Jeżeli znasz width elementu dajesz mu left: 50% i margin-left: -1/2width_elementu

dla przykładu:
width: 600px;
left: 50%;
margin-left: -300px;

oczywiście position: absolute;

Ten post edytował pawkow 27.04.2009, 13:56:45
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: 26.12.2025 - 05:19