Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> wyrownianie strony do srodka, nierowne marginesy ....
djair
post
Post #1





Grupa: Zarejestrowani
Postów: 25
Pomógł: 0
Dołączył: 29.08.2005

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


Witam...mam taki problem, ze przy innej rozdzielczosc niz 1024x768 strona nie jest wysrodokowana...zwlaszcza w 800x600 jest problem, poniewaz lewy margines jest przesuniety i automatycznie nie widac calej zawartosc strony... strona jest oparta o xhtml i css....strona w wersji testowej jest na www.djair.ovh.org ...prosze o pomoc

Kod
html {    
  margin: 0;
  padding: 0;
}
body {  margin:0px; padding:0px;

    font-family: Tahoma,Verdana;
    font-size: 11px;
    font-style: normal;
    line-height: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    background: #31536C;

}
div#blat {    
      position: absolute;
      margin: 52px 12% 0;
      padding: 0;
      }
div#foot {position: absolute;
    margin: 604px 12% 0;
    height: 37px;
    background: url("images/foot.jpg") no-repeat;      
}
div#content {    position: absolute;
  margin: 146px 12.65% 0;
  background: #FFF  0 0 no-repeat;
  height: 459px;
  width: 777px;      
}
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
mike
post
Post #2





Grupa: Przyjaciele php.pl
Postów: 7 494
Pomógł: 302
Dołączył: 31.03.2004

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


Ble, po co pozycjonujesz absolutnie.
W ten sposób nigdy nie uniezależnisz się od rozdzielczości.

Daj tak:
  1. html, body {
  2.    text-align: center; /* HACK na IE */
  3. }
  4.  
  5. div#mainContainer {
  6.    margin: auto;
  7.    text-align: left; /* ustawienie wyrównania spowrotem */
  8. }

Gdzie blok mainContainer zawiera całą stronę.
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: 10.10.2025 - 14:16