<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 ?
<html> <head> <style type="text/css"> html, body { margin: 0; padding: 0; text-align: center /* srodkowanie dla ie */ } div#allBox { margin: 0 auto; /* to dla innych przegladarek - skrocony zapis zero to gora i dol auto lewy i prawy*/ width: 750px; height: 500px; text-align: left; /* wyrownanie tectu w divie do lewej */ } </style> </head> <body> <div id="allBox"> tresc diva </div> </body> </html>
<div style="text-align: center;"> <div style="width: 381; border: 1px solid #859C32; margin-left: auto; margin-right: auto; text-align: left;" id="layer1 "> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur pellentesque enim et odio. Morbi nulla augue, molestie tempor, tincidunt ut, euismod vitae, nulla. Proin et lorem vel libero ullamcorper luctus. Ut sagittis dui at nunc. Nam eget arcu nec tortor ultrices luctus. Integer eget sapien. Aliquam hendrerit tellus ac diam. Etiam a quam vel metus scelerisque malesuada. Quisque felis ipsum, mattis eu, vulputate non, dapibus eget, p urus. Nunc vel dolor at nunc nonummy tristique. Morbi sodales urna vitae arcu. Integer pellentesque pellentesque dolor. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aenean eget neque et risus congue fermentum.</p> </div> </div>