Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [CSS]Wyśrodkowanie elementu w wierszu
pabito
post
Post #1





Grupa: Zarejestrowani
Postów: 77
Pomógł: 4
Dołączył: 14.05.2013

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


Witam
Mam taka tabelkę
http://46.41.129.8/canai_/index9.php

i w zależności od wysokości zdjęcia wiersz odpowiednio sie rozciaga. Chciałbym, aby naipsy byłe zawsze na środku wiersza a nie w górnej częsci. Czy istnieje taka możliwość ?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
pabito
post
Post #2





Grupa: Zarejestrowani
Postów: 77
Pomógł: 4
Dołączył: 14.05.2013

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


ale jak mam go wyliczyć, jeżeli wiesz za każdym razem ma inna wysokość
Go to the top of the page
+Quote Post
fate
post
Post #3





Grupa: Zarejestrowani
Postów: 824
Pomógł: 106
Dołączył: 14.03.2012
Skąd: Warszawa

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


Cytat(pabito @ 27.08.2013, 11:48:51 ) *
ale jak mam go wyliczyć, jeżeli wiesz za każdym razem ma inna wysokość


Czy definijuesz ta wysokosc w PHP czy ona sama wychodzi?
Mozesz tez uzyc JS do pobrania wysokosci i natej podstawie dawac odpowiedni padding.

Ale ja jak koledzy użyłbym vertical-align:middle, jeżeli nie chcesz budować tabeli dajesz display dla np. DIVa:

inline-table The element is displayed as an inline-level table
table The element is displayed as a table
table-caption The element is displayed as a table caption
table-cell The element is displayed as a table cell
table-column The element is displayed as a table column
table-column-group The element is displayed as a table column group (like <colgroup>)
table-footer-group The element is displayed as a table footer row group
table-header-group The element is displayed as a table header row group
table-row The element is displayed as a table row
table-row-group The element is displayed as a table row group
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: 17.10.2025 - 11:33