PDA

View Full Version : Div in PHP page stays left in IE but fine in FF etc


spazzer
03-17-2010, 07:47 PM
Hi,
I have uploaded my site for marking but have found that when I submit a form in my Contacts page the message that displays in a div when the message is sent is on the left hand side in IE all other browsers display the div correctly, do I need to add :

body {
text-align: center; /* for IE */
}

to the body tag for that page to get this to work in IE,can anyone help.

davidj
03-17-2010, 09:15 PM
you need to wrap your message in a div

have you done this?

spazzer
03-17-2010, 09:44 PM
Hi David,
Yes I have wraped the message in a div and given the div a width and set Margin left and right to auto, the div is fine in Firefox and Opera but IE it displays to the left of the page,if you send a message to me in the contact page of my site at euston fishing club (http://www.eustonfishingclub.com) you will see what I mean (hopefully) !
Thanks for reply !

Nick C

gentleone
03-18-2010, 06:38 AM
You need indeed the text-align: center; on the body tag in your CSS... margin: 0 auto; is not enough for IE.

But you could have tried before you asked.