0

This has been stumping me all day. I'm using a mysql based SESSION on my php file. All of the other browsers, except IE, are displaying my pages with the appropriate CSS files and they look fine (more specifically, it is changing my hover effects on my menu and changing the alignment of my footer). I've tested the file without the SESSION code in IE and it works fine. What is causing IE to change my layout when the SESSION is added?? Very frustrated. I'm sure you can tell I'm a php beginner from this message. Please help. Thank you. James

  <?php
 session_start();
 if(@$_SESSION['auth'] != yes)
 {
  header("location: http://www.setdesign-la.com/login_reg.php");
  exit();
 }
echo "<center><a href='logOut.php'>Log Out</a></center>\n";
 ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-GB"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 

Bagelmania | bagels and spreads | delicious coffee | sandwiches

<link rel="shortcut icon" href="bm.ico"> 
<link rel="stylesheet" type="text/css" href="http://www.setdesign-la.com/bagelmaniaStyle.css"/>
<link rel="stylesheet" type="text/css" href="http://www.setdesign-la.com/bagelmaniaMainMenu.css"/>
<link rel="stylesheet" type="text/css" href="http://www.setdesign-la.com/bagelmaniaFooter.css"/>




</head>


<body>
 <div id="topFade"></div>
  <div id="banner">
  <div id="bannerContainer"> 
   <div id="bannerContent">
<div id="bannerFlower"> 
             </div> 
             <!-- END BannerFlower --> 
    <div id="bannerPar">
    </div> <!-- END bannerPar -->


  </div><!-- END bannerContent -->
 </div><!-- END bannerContainer -->
</div><!-- END banner -->

<div id="menuWrapper"> 
<div id="menuContainer"> 
  <div id="centeredmenu"> 

       -Home
       -Affiliate Marketing
       -SEO 

   -Training  
   -Articles 
                 -Tacos
       -Yum 

  </div>   <!-- END centeredmenu --> 
 </div>   <!-- END menuContainer --> 

</div>  <!-- END menuWrapper --> 


<div id="wrapper">
  <div id="container">

1 Answer 1

1

The reason is probably that you are outputting HTML before you are declaring the doctype. That causes IE to switch to quirks mode.

Solution: Move this line

echo "<center><a href='logOut.php'>Log Out</a></center>\n";

into the HTML document.

Sign up to request clarification or add additional context in comments.

1 Comment

That was exactly what it was. Thank you sooooo much, @Pekka !!! It was driving me crazy.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.