sass Posted November 9, 2013 Share Posted November 9, 2013 Hello. I have two webpages with identical php code in the same server (PHP 5.4). I have a problem with picture and logo text positioning.IE versions get the diffrent idea of the positions, I have madethe browser detection and I set the positions for each IE version.Now there is a problem with IE. The pictures are fine one day, but the next day IE displays the pictures diffrently on each page..If I set the file position with pixels in style file then it shows them correctly. Problem is - both webpages are in the same server, the code is identical,I use the same computer and IE8 to watch the pages, I erase the temp and refresh and it still shows them differently.How can it be? Can a faulty php code cause this? Positioning code is as follows:</style><?php if($browser == 'ie' || $browser == 'ie6' || $browser == 'ie7' || $browser == 'ie8') { ?><style>#logo1{position:Relative;left:3px;top:-26px;witdh:340px;z-index:-1;}#logo2{position:absolute;right:13px;top:-2px;witdh:700px;}#text3 { z-index:4; position: Absolute; top:65px;left: 100px;}.all_site {position: Relative; top: -27px; left: 0px; height: 92%;} Another site i must use for same positsins: </style><?php if($browser == 'ie' || $browser == 'ie6' || $browser == 'ie7' || $browser == 'ie8') { ?><style>#logo1{position:Relative;left:3px;top:-7px;witdh:340px;z-index:-1;}#logo2{position:absolute;right:13px;top:-2px;witdh:700px;}#text3 { z-index:4; position: Absolute; top:65px;left: 100px;}.all_site {position: Relative; top: -8px; left: 0px; height: 92%;} for browser detection I use:else if(strpos(strtolower($_SERVER["HTTP_USER_AGENT"]),strtolower("MSIE 8."))){$browser="ie8";} index.php starts as below:<?phpsession_start();include "connect.php";include "pages.php";include "style.php";echo '<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" type="text/javascript" language="Javascript"></script>'; echo '<script src="msg.js" type="text/javascript" language="Javascript"></script>';$logo1 = mysql_query("SELECT * FROM system WHERE name='page_title'");$logo=mysql_fetch_assoc($logo1);echo '<title>'.$logo['value'].'</title>';if($_SESSION['ID'] != "") {$user1 = mysql_query("SELECT * FROM users WHERE ID='".$_SESSION['ID']."'");$user=mysql_fetch_assoc($user1);}$logo1 = mysql_query("SELECT * FROM system WHERE name='page_title'");$logo=mysql_fetch_assoc($logo1);echo '<img id="logo2" src="img/logo2.gif">';echo '<span id="text3"><h3>'.$logo['value'].'</h3></span>';echo '<div class="logo">';echo '<img id="logo1" src="img/logo1.gif" width="340" height="90">';echo '</div>';echo '<center>';echo '<table border="0" width="100%" class="all_site">';if($user['ID'] == "") { echo '<td colspan="2" style="height: 1px;">';} else { echo '<td colspan="1" style="height: 1px;">';}echo '<div class="menu">'; echo '<div style="float:Right; clear:Both;">'; if($user['ID'] != "") { if($user['admin'] == '1') {................................... Link to comment https://forums.phpfreaks.com/topic/283756-positsioning-errors/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.