Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Wyśrodkowanie diva
Siner
post
Post #1





Grupa: Zarejestrowani
Postów: 159
Pomógł: 6
Dołączył: 2.01.2004

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


Mam problem z wyśrodkowaniem diva, pisze taki kod:
  1. <div style="margin-left: auto; margin-right: auto;">

Ale pod IE niestety to nie dziła. Jest jakiś inny sposób na wyśrodkowanie diva ?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Kill3R
post
Post #2





Grupa: Zarejestrowani
Postów: 109
Pomógł: 0
Dołączył: 10.06.2003
Skąd: Tarnobrzeg/Poznań

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


witam ponownie

  1. <div style="text-align: center;">
  2. <div style="width: 381; border: 1px solid #859C32; margin-left: auto; margin-right: auto; text-align: left;" id="layer1 ">
  3. <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur pellentesque enim et odio. Morbi nulla augue, molestie tempor, tincidunt ut,
  4. euismod vitae, nulla. Proin et lorem vel libero ullamcorper luctus. Ut sagittis dui at nunc. Nam eget arcu nec tortor ultrices luctus. Integer eget
  5. sapien. Aliquam hendrerit tellus ac diam. Etiam a quam vel metus scelerisque malesuada. Quisque felis ipsum, mattis eu, vulputate non, dapibus eget, p
  6. urus. Nunc vel dolor at nunc nonummy tristique. Morbi sodales urna vitae arcu. Integer pellentesque pellentesque dolor. Pellentesque habitant morbi
  7. tristique senectus et netus et malesuada fames ac turpis egestas. Aenean eget neque et risus congue fermentum.</p>
  8.  
  9.  
  10. </div>
  11. </div>


juz widzisz o co chodzi??
pierwszy div ma text-align: center dla Internet explorera

a w drugim jest margin-left i right auto dla np firefoxa ale w drugim tez jest text-align: leftdla zawartosci tego drugiego diva

---------------
@revyag
w moim pierwszym przykladzie jest margin: 0 auto; :-)
w drugim przxykladzie poprawialem kod sinera wiec nie zmienialem marginów :-)

Ten post edytował Kill3R 7.09.2005, 11:52:59
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: 4.10.2025 - 16:20