squiblo Posted August 8, 2009 Share Posted August 8, 2009 http://www.squiblo.com/results.php the large blue box isnt where i expected as you may have noticed, will somebody put it in the correct place for me please or guide me to do it, i do not understand CSS. <div id="results" style="position:absolute;left:70px;top:260px;z-index:16"> <font face="arial"> <?php $search = $_GET['search']; if(strlen($search)<3) { echo "Your search must be at least 3 characters long."; $div_height = 'height:500px;'; $img_height = 'height="500"'; } else { $div_height = 'height:1200px;'; $img_height = 'height="1200"'; } ?> <div id="wb_Shape2" style="position:absolute;top:200px;left:54px;<?php echo $div_height; ?>width:793px;z-index:-1;" align="center"> <img src="/Images/body_img.jpg" id="Shape2" align="top" alt="" title="" border="0"<?php echo $img_height; ?> width="793"> </div> <?php //connect to our database mysql_connect("localhost","***","***"); mysql_select_db("***"); //explode our search term $search_exploded = explode(" ",$search); foreach($search_exploded as $search_each) { //construct query $x++; if ($x==1) $construct .= "username LIKE '%$search_each%'"; else $construct .= " OR username LIKE '%$search_each%'"; } //echo out construct $construct = "SELECT * FROM members WHERE $construct"; $run = mysql_query($construct); $foundnum = mysql_num_rows($run); if ($foundnum==0) echo "You searched for <b>$search</b>. No results found."; else { echo "You searched for <b>$search</b><br>$foundnum result(s) found!<p><hr size='1' width='387'color='#E6E6E6'>"; while ($runrows = mysql_fetch_assoc($run)) { //get data $state = ucwords($runrows['state']); $url = $runrows['url']; $username = ucwords($runrows['username']); $imagelocation = $runrows['imagelocation']; if ($imagelocation == "") { $imagelocation = "./profileimages/noprofilepic.jpg"; } echo " <img src ='$imagelocation' width='100' height='105' border='0' align='left' style='padding-right:10px'><br> <b>$username</b><br> $state<br> <a href='$url'>View Profile</a><br><br><br> <hr size='1' width='387' align='left' color='#E6E6E6'> "; } } ?> </font> </div> and yes i ment "positioning" Link to comment https://forums.phpfreaks.com/topic/169353-postitioning/ Share on other sites More sharing options...
abazoskib Posted August 8, 2009 Share Posted August 8, 2009 you mean the ad box? Link to comment https://forums.phpfreaks.com/topic/169353-postitioning/#findComment-893661 Share on other sites More sharing options...
MadnessRed Posted August 10, 2009 Share Posted August 10, 2009 try <div id="wb_Shape2" style="position: absolute; top: -94px; left: -15px; height: 500px; width: 791px; z-index: -1;" align="center"> best fix I can thin of. for now, its a very odd way of doing things you have there. Link to comment https://forums.phpfreaks.com/topic/169353-postitioning/#findComment-894697 Share on other sites More sharing options...
TheFilmGod Posted August 11, 2009 Share Posted August 11, 2009 Yes! Did you dig this website out from some archives? I see code from the early 1990's in there. <font> tag? Absolute positioning? I'm loving this. Solution: Use static positioning w/ floats. Link to comment https://forums.phpfreaks.com/topic/169353-postitioning/#findComment-895276 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.