Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [div] wysrodkowanie, oi x i y
R@ven
post
Post #1





Grupa: Zarejestrowani
Postów: 18
Pomógł: 0
Dołączył: 20.11.2004

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


Jak wysrodowac element w divie wzgledem osi x i y?
Div ma 500x500 px a jpeg np 100x100, wiem jak wysrodkowac wzdluz osi x (text-algain) a wzdluz osi y?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
sebekzosw
post
Post #2





Grupa: Zarejestrowani
Postów: 437
Pomógł: 42
Dołączył: 16.04.2007

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


  1. <div id="komunikat">
  2. <div class="komunikat_srodek">
  3. <div class="komunikat_tresc"></div>
  4. </div>
  5. </div>

Kod
#komunikat {
    width:100%;
    height:100%;
    position:absolute;
    display: table;
}

.komunikat_srodek {
    display: table-cell;
    vertical-align: middle;
}

.komunikat_tresc {
    width:100px;
    height:100px;
    margin:0 auto;
}
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: 12.10.2025 - 22:59