Hey all,
Im having a rendering problem between Ie 6 and Ie7 and i hope that you all can help me figure this one out.
html is the same across the board which is as follows.
<?
// _______
// ----- | CONF. |
// �������
// add new browsers in lower case here, separated
// by spaces - order is important: from left to
// right browser family becomes more precise
$browsers = "mozilla msie gecko firefox ";
$browsers.= "konqueror safari netscape navigator ";
$browsers.= "opera mosaic lynx amaya omniweb";
// _______
// ----- |PROCESS|
// �������
$browsers = split(" ", $browsers);
$nua = strToLower( $_SERVER['HTTP_USER_AGENT']);
$l = strlen($nua);
for ($i=0; $i<count($browsers); $i++){
$browser = $browsers[$i];
$n = stristr($nua, $browser);
if(strlen($n)>0){
$GLOBALS["ver"] = "";
$GLOBALS["nav"] = $browser;
$j=strpos($nua, $GLOBALS["nav"])+$n+strlen($GLOBALS["nav"])+1;
for (; $j<=$l; $j++){
$s = substr ($nua, $j, 1);
if(is_numeric($GLOBALS["ver"].$s) )
$GLOBALS["ver"] .= $s;
else
break;
}
}
}
// _______
// ----- | USE |
// �������
//echo($GLOBALS["nav"] . " " . $GLOBALS["ver"] . "</pre>");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>- Host Our Web -</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<?php
//set style sheet
//if firefox
if($GLOBALS["nav"] == 'firefox')
{
echo '<link href="css/firefox.css" rel="stylesheet" type="text/css">';
}
//if IE* 7/
if($GLOBALS["nav"] == 'msie' and $GLOBALS["ver"] == "7")
{
echo "displaying IE 7";
echo '<link href="css/ie7.css" rel="stylesheet" type="text/css">';
}
//if IE* 6/
if($GLOBALS["nav"] == 'msie' and $GLOBALS["ver"] == "6")
{
echo "displaying IE 6";
echo '<link href="css/ie6.css" rel="stylesheet" type="text/css">';
}
?>
</head>
<body>
<!--primary contain-->
<div id="contain_all">
<!--logo-->
<div id="logo">
<img src="pics/hostourweb.gif" alt="logo">
</div>
<!--end of logo-->
<!--nav bar-->
<div id="nav_bar">
<img src="pics/home_sel.gif" alt="home" >
<img src="pics/login_not.gif" alt="" >
<img src="pics/services_not.gif" alt="" >
<img src="pics/specials_not.gif" alt="" >
<img src="pics/support_not.gif" alt="" >
</div>
<!--end of nav bar-->
<div id="spacer">
</div>
<div id="content">
<div id="top_content">
<img id="left_content_pic" src="pics/lft_top.gif" alt="">
<img id="right_content_pic" src="pics/rt_top.gif" alt="">
<div id="spacer">
</div>
</div>
<!--end of top_content-->
<div id="lft_content">
<div id="content_center">
<div id="lft_text_contain">
<div id="lft_text">
<center>
Linux Starter
</center>
</div>
<!--end of div.lft_text-->
<center style="font-size:13px; padding-top:5px; color:red;">More Linux Plans</center>
</div>
<!--end of div.lft_text_contain-->
<div id="rt_text_contain">
<div id="rt_text">
<center>
Domain Registration
</center>
</div>
<!--end of div.rt_text-->
<center style="font-size:13px; padding-top:5px; color:red;">More Domain prices</center>
</div>
<!--end of div.rt_text_contain-->
<div id="ctr_text_contain">
<div id="ctr_text">
<center>
Windows Starter
</center>
</div>
<!--end of div.ctr_text-->
<center style="font-size:13px; padding-top:5px; color:red;">More Windows Plans</center>
</div>
<!--end of div.ctr_text_contain-->
</div>
<!--end of content_center-->
<div id="spacer">
</div>
</div>
<!--end of lft content-->
<div id="spacer">
</div>
<div id="btm_content">
<img id="left_content_pic" src="pics/lft_btm.gif" alt="">
<img id="right_content_pic" src="pics/rt_btm.gif" alt="">
<div id="spacer">
</div>
</div>
<!--end of btm_content-->
</div>
<!--end of content-->
</div>
<!--end of primary contain-->
</body>
</html>
my css code for Ie 7
/* CSS Document */
body
{
background-color:black;
text-align: center;
}
#logo
{
text-align: left;
}
#contain_all
{
margin-left:auto;
margin-right:auto;
max-width:800px;
min-width:800px;
padding-top:20px;
}
#logo
{
margin-left:0px;
}
#nav_bar
{
padding-top:0px;
padding-right:30px;
float:right;
}
#content
{
margin-top:-7px;
background-image:url(../pics/rt_side.gif);
background-repeat:repeat-y;
background-position:right;
}
#top_content
{
background-repeat:repeat-x;
background-image:url(../pics/top_vert.gif);
}
#left_content_pic
{
float:left;
clear:right;
}
#right_content_pic
{
float:right;
}
#spacer
{
clear: both;
}
#spacer1
{
height:auto;
}
#lft_content
{
text-align:left;
color:white;
background-image:url(../pics/lft_side.gif);
background-position:left;
background-repeat:repeat-y;
}
#content_center
{
padding-top:10px;
max-width:700px;
min-width:700px;
margin-left:auto;
margin-right:auto;
}
#lft_text_contain
{
float:left;
color:white;
clear:both;
width:200px;
}
#lft_text
{
border:thin white solid;
width:200px;
}
#ctr_text_contain
{
margin-left:auto;
margin-right:auto;
color:white;
width:200px;
}
#ctr_text
{
border:thin white solid;
width:200px;
}
#rt_text_contain
{
float:right;
color:white;
}
#rt_text
{
border:thin white solid;
width:200px;
}
#btm_content
{
background-repeat:repeat-x;
background-image:url(../pics/btm_vert.gif);
screen shot of Ie 7
css code for ie 6
/* CSS Document */
body
{
background-color:black;
text-align: center;
}
#logo
{
text-align: left;
}
#contain_all
{
margin-left:auto;
margin-right:auto;
max-width:800px;
min-width:800px;
padding-top:20px;
}
#logo
{
margin-left:0px;
}
#nav_bar
{
padding-top:0px;
padding-right:30px;
float:right;
}
#content
{
overflow:scroll;
margin-top:-7px;
background-image:url(../pics/rt_side.gif);
background-repeat:repeat-y;
background-position:right;
}
#top_content
{
background-repeat:repeat-x;
background-image:url(../pics/top_vert.gif);
background-position:top;
}
#left_content_pic
{
float:left;
clear:right;
}
#right_content_pic
{
float:right;
}
#spacer
{
clear: both;
}
#spacer1
{
height:auto;
}
#lft_content
{
text-align:left;
color:white;
background-image:url(../pics/lft_side.gif);
background-position:left;
background-repeat:repeat-y;
}
#content_center
{
padding-top:10px;
max-width:700px;
min-width:700px;
margin-left:auto;
margin-right:auto;
}
#lft_text_contain
{
float:left;
color:white;
clear:both;
width:200px;
}
#lft_text
{
border:thin white solid;
width:200px;
}
#ctr_text_contain
{
margin-left:auto;
margin-right:auto;
color:white;
width:200px;
}
#ctr_text
{
border:thin white solid;
width:200px;
}
#rt_text_contain
{
float:right;
color:white;
}
#rt_text
{
border:thin white solid;
width:200px;
}
#btm_content
{
background-repeat:repeat-x;
background-image:url(../pics/btm_vert.gif);
screen shot of ie6
I would like my ie7 picture to look like ie6.
Any suggestions?