Jump to content

[SOLVED] Making my layout IE compatable


Xyphon

Recommended Posts

top.php:

<?PHP

include('Connect.php');
if (!isset($_COOKIE['UserID'])) 
{
$ID = $_COOKIE['UserID'];
$ID = mysql_real_escape_string($ID);
echo "
<html>
<title>Naruto Palace RPG</title>
<head>
<style type='text/css'>
a:link {
color:#ACACAC;
text-decoration:none;
font-weight:bold;
}

a:visited {
color:#ACACAC;
text-decoration:none;
font-weight:bold;
}

a:hover {
border:1px dashed #000000;
padding-left:5px;
padding-right:5px
}

body {
width:750px;
margin:0px auto;
background:#C0C0C0;
}

#banner {
border:1px solid #000000;
width:748px;
height:148px;
float:left;
background:#5C5C5C;
}

#quicklinks {
border:1px solid;
border-top:0px;
float:left;
width:738px;
padding:0px 5px 0px 5px; 
background:#5C5C5C;
}

#leftmenu {
float:left;
width:128px;
border:1px solid #000000;
border-top:0px;
padding:5px;
background:#5C5C5C;
}

#leftmenu ul {
margin:0;
padding:0;
list-style-type:none;
}

#leftmenu li {
font-weight:bold;
font-variant:small-caps;
padding:0px 2px;
font-size:medium;
letter-spacing:1px;
}

#leftmenu li ul li {
font-weight:normal;
background:transparent;
padding:0px 8px;
font-size:x-small;
font-variant:normal;
letter-spacing:0px;
}

#content {
float:left;
width:386px;
height:500px;
border:1px solid #000000;
margin:5px;
padding:5px;
background:#5C5C5C;
}

#rightmenu {
float:left;
border:1px solid #000000;
border-top:0px;
padding:5px;
width:190px;
background:#5C5C5C;
}

#rightmenu ul {
margin:0;
padding:0;
list-style-type:none;
}

#rightmenu li {
font-weight:bold;
font-variant:small-caps;
padding:0px 2px;
font-size:medium;
letter-spacing:1px;
}

#rightmenu li ul li {
font-weight:normal;
background:transparent;
padding:0px 8px;
font-size:x-small;
font-variant:normal;
letter-spacing:0px;
}

textarea {
background:#FFFFFF;
width:100%;
height:200px;
}

#footer {
width:386px;
border:1px solid #000000;
margin-left:145px;
float:left;
padding:5px;
background:#5C5C5C;
}
</style>
</head>
<body>
<div id='banner'><img src='http://img164.imageshack.us/img164/2232/1232399406mq9.png'></div>
<div id='quicklinks'></div>
<div id='leftmenu'>
<ul>
<li>Main
<ul>
<li><a href='index.php'>Home</a></li>
<li><a href='login.php'>Login</a></li>
<li><a href='register.php'>Register</a></li>
</ul>
</li>
</ul></div>
<div id='content'>
";
}
else
{
echo "
<html>
<title>Naruto Palace RPG</title>
<head>
<style type='text/css'>
a:link {
color:#ACACAC;
text-decoration:none;
font-weight:bold;
}

a:visited {
color:#ACACAC;
text-decoration:none;
font-weight:bold;
}

a:hover {
border:1px dashed #000000;
padding-left:5px;
padding-right:5px
}

body {
width:750px;
margin:0px auto;
background:#C0C0C0;
}

#banner {
border:1px solid #000000;
width:748px;
height:148px;
float:left;
background:#5C5C5C;
}

#quicklinks {
border:1px solid;
border-top:0px;
float:left;
width:738px;
padding:0px 5px 0px 5px; 
background:#5C5C5C;
}

#leftmenu {
float:left;
width:128px;
border:1px solid #000000;
border-top:0px;
padding:5px;
background:#5C5C5C;
}

#leftmenu ul {
margin:0;
padding:0;
list-style-type:none;
}

#leftmenu li {
font-weight:bold;
font-variant:small-caps;
padding:0px 2px;
font-size:medium;
letter-spacing:1px;
}

#leftmenu li ul li {
font-weight:normal;
background:transparent;
padding:0px 8px;
font-size:x-small;
font-variant:normal;
letter-spacing:0px;
}

#content {
float:left;
width:386px;
height:500px;
border:1px solid #000000;
margin:5px;
padding:5px;
background:#5C5C5C;
}

#rightmenu {
float:left;
border:1px solid #000000;
border-top:0px;
padding:5px;
width:190px;
background:#5C5C5C;
}

#rightmenu ul {
margin:0;
padding:0;
list-style-type:none;
}

#rightmenu li {
font-weight:bold;
font-variant:small-caps;
padding:0px 2px;
font-size:medium;
letter-spacing:1px;
}

#rightmenu li ul li {
font-weight:normal;
background:transparent;
padding:0px 8px;
font-size:x-small;
font-variant:normal;
letter-spacing:0px;
}

textarea {
background:#FFFFFF;
width:100%;
height:200px;
}

#footer {
width:386px;
border:1px solid #000000;
margin-left:145px;
float:left;
padding:5px;
background:#5C5C5C;
}
</style>
</head>
<body>
<div id='banner'><img src='http://img164.imageshack.us/img164/2232/1232399406mq9.png'></div>
<div id='quicklinks'></div>
</div>
<!-- END CBOX --></div>
<div id='leftmenu'>
<ul>
<li>Main
<ul>
<li><a href='index.php'>Home</a></li>
<li><a href='logout.php'>Logout</a></li>
<li><a href=''>Rules<font color='red'>*</font></a></li>
<li><a href=''>Forums<font color='red'>*</font></a></li>
<li><a href='itempromo.php'>Item Promo</a></li>
</ul>
</li>
<li>Clans
<ul>
<li><a href='clans.php'>Join a Clan</a></li>
<li><a href=''>Bloodline Shop<font color='red'>*</font></a></li>
</ul>
</li>
<li>Villages
<ul>
<li><a href='village.php'>Join a Village</a></li>
<li><a href='abandon.php'>Abandon Village</a></li>
<li><a href=''>Konoha<font color='red'>*</font></a></li>
<li><a href=''>Suna<font color='red'>*</font></a></li>
<li><a href=''>Kiri<font color='red'>*</font></a></li>
<li><a href=''>Amegakure<font color='red'>*</font></a></li>
</ul>
</li>
<li>Shops
<ul>
<li><a href=''>Taijutsu Shop<font color='red'>*</font></a></li>
<li><a href=''>Ninjutsu Shop<font color='red'>*</font></a></li>
<li><a href=''>Genjutsu Shop<font color='red'>*</font></a></li>
<li><a href=''>Weapon Shop<font color='red'>*</font></a></li>
</ul>
</li>
<li>Sell Items/Jutsus
<ul>
<li><a href=''>Sell Taijutsu<font color='red'>*</font></a></li>
<li><a href=''>Sell Ninjutsu<font color='red'>*</font></a></li>
<li><a href=''>Sell Genjutsu<font color='red'>*</font></a></li>
<li><a href=''>Sell Weapons<font color='red'>*</font></a></li>
</ul>
</li>
</ul>

</div>
<div id='content'>
";


}
$usercheck = addslashes($_POST['username']);
$usercheck = mysql_real_escape_string($usercheck);
    $passcheck = md5(addslashes($_POST['password']));
$passcheck = mysql_real_escape_string($passcheck);
$BannedResult= mysql_query("SELECT * FROM users WHERE id='$ID'");
$BannedRows= mysql_fetch_array($BannedResult);
$IPResult= mysql_query("SELECT * FROM ip_banned");
$IPRows= mysql_fetch_array($IPResult);
$IPBanned= $IPRows['IP'];
if($BannedRows['Banned']=='Yes')
{
echo "Sorry, you are banned. You will now be logged out, please go <a href='index.php'>back</a>.";
$Result1 = mysql_query("SELECT * FROM users WHERE username='$usercheck' AND password='$passcheck'");
    $Rows1 = mysql_fetch_array($Result1);
    

    $UserID = $Rows1['ID'];
setcookie("UserID", "$UserID", time() - 9999999);
include('bottom.php');
exit;
}

?>

bottom.php:

<?PHP
if(isset($_COOKIE['UserID']))
{
$ID = $_COOKIE['UserID'];
$ID = mysql_real_escape_string($ID);
$Search_Query = "SELECT ID FROM users";

$ResultM = mysql_query($Search_Query);

$ResultM_Count = mysql_num_rows($ResultM);
echo "
<html>
</div>
<div id='rightmenu'>
<ul>
<li>Main
<ul>
<li><a href=''>Your PMs<font color='red'>*</font></a></li>
<li><a href='members.php?id=$ID'>Member List(<b>$ResultM_Count</b>)</a></li>
<li><a href='viewprofile.php?id=$ID'>Your Profile</a></li>
<li><a href='viewprofiles.php'>View Profiles</a></li>";
if($Staffornot=="Student")
{
}
elseif($Staffornot=="Genin")
{
}
elseif($Staffornot=="Chuunin")
{
}
elseif($Staffornot=="Jonin")
{
}
elseif($Staffornot=="Sanin")
{
}
else
{
echo "<li><a href='staffoptions.php'>Staff Options</a></li>";
}
echo "<li><a href='medicninja.php'>Medic Ninja</a></li>

</ul>
</li>
</ul>
<ul>
<li>Battle
<ul>
<li><a href=''>Boss Battles<font color='red'>*</font></a></li>
<li><a href=''>Missions<font color='red'>*</font></a></li>
<li><a href='pvp.php'>PvP</a></li>
<li><a href=''>Ranks<font color='red'>*</font></a></li>
</ul>
</li>
</ul>
<ul>
<li>Ninja Ranks
<ul>
<li><a href=''>Genin Exams<font color='red'>*</font></a></li>
<li><a href=''>Chuunin Exams<font color='red'>*</font></a></li>
<li><a href=''>Jonin Exams<font color='red'>*</font></a></li>
<li><a href=''>Sanin Training<font color='red'>*</font></a></li>
</ul>
</li>
</ul>
<ul>
<li>Equipment
<ul>
<li><a href='itembox.php'>Item Box</a></li>
<li><a href='viewitem.php?id=$ID'>Your Equipped Items</a></li>
<li><a href='viewitems.php'>Other Players Items</a></li>
</ul>
</li>
</ul>
</div>
<div id='footer'>Naruto Palace is Copyright 2008 all rights reserved. Naruto Palace is in no way affiliated with the creators of Naruto, or any of their affiliates.</div>


</body>


</html>
";

}

else
{

echo "<html>
</div>
<div id='rightmenu'>
<ul>
<li>Main
<ul>
<li><a href='index.php'>Home</a></li>
<li><a href='login.php'>Login</a></li>
<li><a href='register.php'>Register</a></li>
</ul>
</li>
</ul>
</div>
<div id='footer'>Naruto Palace is Copyright 2008 all rights reserved. Naruto Palace is in no way affiliated with the creators of Naruto, or any of their affiliates.</div>
</body>



</html>
";
}
?>

 

That is it. It works fine in firefox but in IE the right menue floats over past the left menue and above the content.

Link to comment
Share on other sites

Heres the page source:

<html>
<title>Naruto Palace RPG</title>
<head>
<style type='text/css'>
a:link {
color:#000000;
text-decoration:none;
font-weight:bold;
}

a:visited {
color:#000000;
text-decoration:none;
font-weight:bold;
}

a:hover {
border:1px dashed #000000;
padding-left:5px;
padding-right:5px
}

body {
width:750px;
margin:0px auto;
background:#C0C0C0;
}

#banner {
border:1px solid #000000;
width:748px;
height:148px;
float:left;
background:#5C5C5C;
}

#quicklinks {
border:1px solid;
border-top:0px;
float:left;
width:738px;
padding:0px 5px 0px 5px;
background:#5C5C5C;
}

#leftmenu {
float:left;
width:128px;
border:1px solid #000000;
border-top:0px;
padding:5px;
background:#5C5C5C;
}

#leftmenu ul {
margin:0;
padding:0;
list-style-type:none;
}

#leftmenu li {
font-weight:bold;
font-variant:small-caps;
padding:0px 2px;
font-size:medium;
letter-spacing:1px;
}

#leftmenu li ul li {
font-weight:normal;
background:transparent;
padding:0px 8px;
font-size:x-small;
font-variant:normal;
letter-spacing:0px;
}

#content {
float:left;
width:386px;
border:1px solid #000000;
margin:5px;
padding:5px;
background:#5C5C5C;
}

#rightmenu {
float:left;
border:1px solid #000000;
border-top:0px;
padding:5px;
width:190px;
background:#5C5C5C;
}

#rightmenu ul {
margin:0;
padding:0;
list-style-type:none;
}

#rightmenu li {
font-weight:bold;
font-variant:small-caps;
padding:0px 2px;
font-size:medium;
letter-spacing:1px;
}

#rightmenu li ul li {
font-weight:normal;
background:transparent;
padding:0px 8px;
font-size:x-small;
font-variant:normal;
letter-spacing:0px;
}

textarea {
background:#FFFFFF;
width:100%;
height:200px;
}

#footer {
width:386px;
border:1px solid #000000;
margin-left:145px;
float:left;
padding:5px;
background:#5C5C5C;
}
</style>
</head>
<body>
<div id='banner'><img src='http://img164.imageshack.us/img164/2232/1232399406mq9.png'></div>
<div id='quicklinks'></div>
<div id='leftmenu'>
<ul>
<li>Main
<ul>
<li><a href='index.php'>Home</a></li>

<li><a href='login.php'>Login</a></li>
<li><a href='register.php'>Register</a></li>
</ul>
</li>
</ul></div>
<div id='content'>
Content here
<html>
<p></p>
<table width='386' border='2' bordercolor='black'><td>Naruto Palace is Copyright 2008 all rights reserved. Naruto Palace is in no way affiliated with the creators of Naruto, or any of their affiliates.</td></table>
</div>
<div id='rightmenu'>
<ul>
<li>Main
<ul>

<li><a href='index.php'>Home</a></li>
<li><a href='login.php'>Login</a></li>
<li><a href='register.php'>Register</a></li>
</ul>
</li>
</ul>
</div>



</html>

What do you mean by formatting?

Link to comment
Share on other sites

You have a lot of errors in your code that would make it non-complient with IE. First of all a structured document should look like this

 

//doctype here

//html tag here 
/* then do this */

<body>
<head>
<title> blah </title>
//include your style sheets and meta here, etc
</head>
<body>
/*
Here is your html code
*/
</body>
</html>

 

You forgot your doctype, your head section, etc.

 

Cheers. First post here in 2 months. Feels good to be back

Link to comment
Share on other sites

Thank you a lot! one more problem, on IE whenever I make bgcolor='grey' it turns green, but lightgrey, red, ect, work.. Sourse:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<body>
<head>
<style type='text/css'>
a:link {
color:#000000;
text-decoration:none;
font-weight:bold;
}

a:visited {
color:#000000;
text-decoration:none;
font-weight:bold;
}

a:hover {
border:1px dashed #000000;
padding-left:5px;
padding-right:5px
}

body {
width:750px;
margin:0px auto;
background:#C0C0C0;
}

#banner {
border:1px solid #000000;
width:748px;
height:148px;
float:left;
background:#5C5C5C;
}

#quicklinks {
border:1px solid;
border-top:0px;
float:left;
width:738px;
padding:0px 5px 0px 5px;
background:#5C5C5C;
}

#leftmenu {
float:left;
width:128px;
border:1px solid #000000;
border-top:0px;
padding:5px;
background:#5C5C5C;
}

#leftmenu ul {
margin:0;
padding:0;
list-style-type:none;
}

#leftmenu li {
font-weight:bold;
font-variant:small-caps;
padding:0px 2px;
font-size:medium;
letter-spacing:1px;
}

#leftmenu li ul li {
font-weight:normal;
background:transparent;
padding:0px 8px;
font-size:x-small;
font-variant:normal;
letter-spacing:0px;
}

#content {
float:left;
width:386px;
border:1px solid #000000;
margin:5px;
padding:5px;
background:#5C5C5C;
}

#rightmenu {
float:left;
border:1px solid #000000;
border-top:0px;
padding:5px;
width:190px;
background:#5C5C5C;
}

#rightmenu ul {
margin:0;
padding:0;
list-style-type:none;
}

#rightmenu li {
font-weight:bold;
font-variant:small-caps;
padding:0px 2px;
font-size:medium;
letter-spacing:1px;
}

#rightmenu li ul li {
font-weight:normal;
background:transparent;
padding:0px 8px;
font-size:x-small;
font-variant:normal;
letter-spacing:0px;
}

textarea {
background:#FFFFFF;
width:100%;
height:200px;
}

#footer {
width:386px;
border:1px solid #000000;
margin-left:145px;
float:left;
padding:5px;
background:#5C5C5C;
}
</style>
</head>
<title>Naruto Palace RPG</title>
<body>
<div id='banner'><img src='http://img164.imageshack.us/img164/2232/1232399406mq9.png'></div>
<div id='quicklinks'></div>
</div>
<!-- END CBOX --></div>
<div id='leftmenu'>
<ul>
<li>Main
<ul>
<li><a href='index.php'>Home</a></li>
<li><a href='logout.php'>Logout</a></li>
<li><a href=''>Rules<font color='red'>*</font></a></li>
<li><a href=''>Forums<font color='red'>*</font></a></li>
<li><a href='itempromo.php'>Item Promo</a></li>
</ul>
</li>
<li>Clans
<ul>
<li><a href='clans.php'>Join a Clan</a></li>
<li><a href=''>Bloodline Shop<font color='red'>*</font></a></li>
</ul>
</li>
<li>Villages
<ul>
<li><a href='village.php'>Join a Village</a></li>
<li><a href='abandon.php'>Abandon Village</a></li>
<li><a href=''>Konoha<font color='red'>*</font></a></li>
<li><a href=''>Suna<font color='red'>*</font></a></li>
<li><a href=''>Kiri<font color='red'>*</font></a></li>
<li><a href=''>Amegakure<font color='red'>*</font></a></li>
</ul>
</li>
<li>Shops
<ul>
<li><a href=''>Taijutsu Shop<font color='red'>*</font></a></li>
<li><a href=''>Ninjutsu Shop<font color='red'>*</font></a></li>
<li><a href=''>Genjutsu Shop<font color='red'>*</font></a></li>
<li><a href=''>Weapon Shop<font color='red'>*</font></a></li>
</ul>
</li>
<li>Sell Items/Jutsus
<ul>
<li><a href=''>Sell Taijutsu<font color='red'>*</font></a></li>
<li><a href=''>Sell Ninjutsu<font color='red'>*</font></a></li>
<li><a href=''>Sell Genjutsu<font color='red'>*</font></a></li>
<li><a href=''>Sell Weapons<font color='red'>*</font></a></li>
</ul>
</li>
</ul>

</div>
<div id='content'>
Content here
<html>
<p></p>
<table width='386' border='2' bordercolor='black'><td>Naruto Palace is Copyright 2008 all rights reserved. Naruto Palace is in no way affiliated with the creators of Naruto, or any of their affiliates.</td></table>
</div>

<div id='rightmenu'>
<ul>
<li>Main
<ul>
<li><a href=''>Your PMs<font color='red'>*</font></a></li>
<li><a href='members.php?id=1'>Member List(<b>3</b>)</a></li>
<li><a href='viewprofile.php?id=1'>Your Profile</a></li>
<li><a href='viewprofiles.php'>View Profiles</a></li><li><a href='staffoptions.php'>Staff Options</a></li><li><a href='medicninja.php'>Medic Ninja</a></li>

</ul>
</li>
</ul>
<ul>
<li>Battle
<ul>
<li><a href=''>Boss Battles<font color='red'>*</font></a></li>
<li><a href=''>Missions<font color='red'>*</font></a></li>
<li><a href='pvp.php'>PvP</a></li>
<li><a href=''>Ranks<font color='red'>*</font></a></li>
</ul>
</li>
</ul>
<ul>
<li>Ninja Ranks
<ul>
<li><a href=''>Genin Exams<font color='red'>*</font></a></li>
<li><a href=''>Chuunin Exams<font color='red'>*</font></a></li>
<li><a href=''>Jounin Exams<font color='red'>*</font></a></li>
<li><a href=''>Anbu Training<font color='red'>*</font></a></li>
</ul>
</li>
</ul>
<ul>
<li>Equipment
<ul>
<li><a href='itembox.php'>Item Box</a></li>
<li><a href='viewitem.php?id=1'>Your Equipped Items</a></li>
<li><a href='viewitems.php'>Other Players Items</a></li>
</ul>
</li>
</ul>
</div>



</body>


</html>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.