Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> div na środku strony
Apo
post
Post #1





Grupa: Zarejestrowani
Postów: 426
Pomógł: 1
Dołączył: 2.10.2005

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


Witam
Mam pytanie jak umieścić div'a lub tabelke na środku strony (w pionie i w poziomie) aby chodziło na IE, FF i operze :?
Z góry thx
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Nazin
post
Post #2





Grupa: Zarejestrowani
Postów: 7
Pomógł: 0
Dołączył: 10.09.2005
Skąd: Kraków

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


  1. html, body {
  2.  height: 100%;
  3.  width: 100%;
  4. }
  5. html {
  6.  display:table;
  7. }
  8. body {
  9.      text-align: center;
  10.      vertical-align: middle;
  11.      display: table-cell;
  12. }
  13. #main {
  14.      margin: 0 auto;
  15.        border: 0px;
  16.      width: 780px;
  17.      height: 600px;
  18.      background: #000;
  19. }
  20. * html #main {
  21.  position: absolute;
  22.  top: expression((x=(document.documentElement.offsetHeight-this.offsetHeight)/2)<0?0:x+'px');
  23.  left: 50%;
  24.  margin-left: -400px;
  25. }


Spróbuj tak (IMG:http://forum.php.pl/style_emoticons/default/tongue.gif)

a wyświetlenie to oczywiście

  1. <div id="main">ble bla bli</div>
Go to the top of the page
+Quote Post

Posty w temacie


Closed TopicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 14.10.2025 - 00:46