Webpage Alignment problems with Internet Explorer

9 replies
  • WEB DESIGN
  • |
Hi all, I'm new to this forum but have heard great things about it from other marketers.

Anyway, I have some web page alignment issues that are doing my head in!! :confused:

I was hoping somebody could help me out!

The problem im having is that every time I view my web pages in IE8 my page is aligned to the left but I want it to be centered in all browsers. Its fine in Firefox!

If somebody could take a look I would be very grateful.

My problem page is; EatGreatToLoseWeightDietPlan.com/slimming-dieting

I'm sure that to most of you guys this will be easy but to me its borderline Rocket Science.

Thanks in advance guys!

Wayne
#alignment #explorer #internet #problems #webpage
  • Profile picture of the author Bex7175
    Hi Wayne,

    Apparently this is quite a common problem in IE8 and can be solved by starting the source code of your page with a complete and valid doctype which needs to be the very first thing on the website (before the usual <html> tag). This doctype is essential for valid HTML/XHTML documents so it could be that causing the problem.

    Try inserting this line of code right at the top of your source code:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    Hopefully that'll catch the error.
    {{ DiscussionBoard.errors[1286890].message }}
    • Profile picture of the author waynemartin2
      Thanks for the pointer, but unfortunately it didn't work.

      My nightmare continues!!!!
      {{ DiscussionBoard.errors[1286928].message }}
  • Profile picture of the author Poglia
    Replace this:

    <body style="background-color: rgb(153, 153, 153);">
    <table style="width: 760px; text-align: left; margin-left: auto; margin-right: auto;" class="border" border="0" cellpadding="0" cellspacing="0">


    With this:

    <body style="background-color: rgb(153, 153, 153); width: 760px; margin-left: auto; margin-right: auto;">
    <table class="border" border="0" cellpadding="0" cellspacing="0">
    Signature

    {{ DiscussionBoard.errors[1287290].message }}
  • Profile picture of the author Aronya
    You just need to change the body tag: <body style="background-color: rgb(153, 153, 153); text-align:center;">
    {{ DiscussionBoard.errors[1287303].message }}
    • Profile picture of the author Poglia
      Originally Posted by Aronya View Post

      You just need to change the body tag: <body style="background-color: rgb(153, 153, 153); text-align:center;">
      Using "text-align: center" on the body will not center tables. The body must have a fixed width and auto margins as I posted above.
      Signature

      {{ DiscussionBoard.errors[1287308].message }}
  • Profile picture of the author Aronya
    Works on my system.
    {{ DiscussionBoard.errors[1287330].message }}
    • Profile picture of the author waynemartin2
      OK, I will definitely try this and report back.

      Thanks guys!
      {{ DiscussionBoard.errors[1287566].message }}
    • Profile picture of the author waynemartin2
      Hi guys,

      Poglia, I tried what you suggested and it worked on a different web page I also had a problem with but not the the one I mentioned in this post.

      Aronya, I tried your way and it works on the page I've mentioned above, Harrraaa!!

      Thanks a lot guys I really appreciate your input with this, you've been a massive help.

      All the best,

      A now happy, wayne
      {{ DiscussionBoard.errors[1287586].message }}

Trending Topics