damian0612 Posted January 27, 2010 Share Posted January 27, 2010 Can someone please explain how I can fix a problem I have. I have a page where I have a php include which is for a search menu at the top of a page under a header. The code works perfectly when viewed on firefox but it displays totally wrong on IE and I'm stumped as to why. I'm not sure if it is a problem with my php include, html or css. Here is the page: www.mo-ait.com/testpage.php Here is the html: <div id="container"> <div id="header"> <a href="/" id="logo"><img src="/images/header2.jpg" height="100px" width="900px" border="0"/></a> </div> <div id="search_container"> <?php require_once ("mysearch.php"); ?> </div> here is the php include file: <div id="search_left"> <?php $quer2=mysql_query("SELECT DISTINCT category,cat_id FROM cardlist ORDER by category"); $cat=$_GET['cat']; //This line is added to take care if your global variable is off if(strlen($cat) > 0 and !is_numeric($cat)){ //check if $cat is numeric data or not. echo "Data Error"; exit; } if(isset($cat) and strlen($cat) > 0){ $quer=mysql_query("SELECT DISTINCT subcategory FROM cardlist where cat_id=$cat ORDER by subcategory"); }else{$quer=mysql_query("SELECT DISTINCT subcategory FROM cardlist ORDER by subcategory"); } echo "<table><tr><td>"; echo "What's it for? </td><td>"; echo "<form method=post name=f1 action=''>"; /// Add your form processing page address to //action in above line. Example action=dd-check.php//// ////////// Starting of first drop downlist ///////// echo "<select name='cat' onchange=\"reload(this.form) \"><option value=''>Select one</option>"; while($noticia2 = mysql_fetch_array($quer2)) { if($noticia2['cat_id']==@$cat) {echo "<option selected value='$noticia2[cat_id]'>$noticia2[category]</option>"."<BR>";} else{ echo "<option value='$noticia2[cat_id]'>$noticia2[category]</option>";} } echo "</select>"; echo "</td><td>"; ////////////////// This will end the first drop down list /////////// echo "</td><td>"; echo "Who's it for? </td><td>"; ////////// Starting of second drop downlist ///////// echo "<select name='subcat'><option value=''>Select one</option>"; while($noticia = mysql_fetch_array($quer)) { echo "<option value='$noticia[subcategory]'>$noticia[subcategory]</option>"; } echo "</select>"; ////////////////// This will end the second drop down list /////////// // add your other form fields here //// echo "<input type=submit value=Submit>"; echo "</form>"; echo "</td></tr></table>"; echo "</div>"; echo "<div id='search_right'>"; echo "<form name='myform2' action='/search.php' method='GET'>"; echo "<input name='search_all' input type='text' value='search'/>"; echo "<input type='submit' value='Submit'/>"; echo "</form>"; echo "</div>"; ?> and here is the css: div#search_container{background-image:url(/images/header.jpg); margin-top:-5px;line-height:40px;padding: 0;valign:top;} div#search_left{float:left;margin:10;color:#FFFFFF;font-weight:bold;valign:top;} div#search_right{float:right;margin-right:10px;color:#FFFFFF;font-weight:bold;valign:top;} Would appreciate any help at all on this, thanks Quote Link to comment https://forums.phpfreaks.com/topic/189969-php-include-problem/ Share on other sites More sharing options...
jl5501 Posted January 27, 2010 Share Posted January 27, 2010 You display problems on IE are to do with your CSS. Specifically having floating divs in a non floating container. Quote Link to comment https://forums.phpfreaks.com/topic/189969-php-include-problem/#findComment-1002309 Share on other sites More sharing options...
damian0612 Posted January 27, 2010 Author Share Posted January 27, 2010 Thank you so much, I have now fixed it, I appreciate your help, cheers Quote Link to comment https://forums.phpfreaks.com/topic/189969-php-include-problem/#findComment-1002316 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.