After thinking my website worked perfect on all browsers, IE8 came along and ruined it!! I can't wait for the day that Microsoft are banned from developing web browsers. The common CSS for centering a DIV on IE8 as shown below doesn't work:
#container{
margin:0 auto;}To solve this you need the following CSS:
body{
text-align: center;}
#container{
margin:0 auto;
text-align:left;
}Using text-align: center; centers the DIV for IE, and the text-align: left; margin: 0 auto; will align the text to the left, and center the DIV for other browsers.
Hopefully this little tip will prevent some page builders from having a nervous breakdown
Thanks! Worked like a charm.
This worked great for me. Thank you .
I think you just saved me from having more than just a breakdown!! Thank you, I didnt have this problem on other sites I have worked on but it happened with a new project today and I had no idea why.
THANK YOU!!
To be honest I think there may be an underlying issue with my markup that is causing this because I have not seen this on any other sites I have built but glad it helped.
ThanQ, ThanQ, Thanq ver Mush
I WAS having a breakdown and now it’s all sorted.
THANK YOU! I can’t believe it’s that simple! I’ve spent the last few hours screaming at my computer, wishing microsoft weren’t allowed to make software, and then I tried this tip and… perfect!
Thank you
Muchas gracias!. Me estaba volviendo loco.
Funciono perfecto.