Jump to content

results display strangely?


MikeDXUNL

Recommended Posts

i have a real weird issue, in firefox the table behaves correctly...but in Internet Explorer (figures) the table expands the whole way.

 

i have:

<table width="55%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="center">
<div align="center"><img src="../images/aimicons.png"></div>
	<?php
	$result = mysql_query("SELECT * FROM aimicons ORDER BY id DESC");
while ($row = mysql_fetch_object($result)) {
echo "<img src=\"aimicons/" .$row->image. "\" border=\"1\"> \n";
}
mysql_free_result($result);
?>

</td>
  </tr>
</table>

 

now i have like 18 results stored in my database. when i view this in firefox, it will show the results in a fixed table (at 55%) but when i view it in IE7 it expands to the entire page. any suggestions?

Link to comment
https://forums.phpfreaks.com/topic/46640-results-display-strangely/
Share on other sites

i dont really like using \n, try using a <br>

<?php
	$result = mysql_query("SELECT * FROM aimicons ORDER BY id DESC");
while ($row = mysql_fetch_object($result)) {
echo "<img src=\"aimicons/" .$row->image. "\" border=\"1\"> <br>";
}
mysql_free_result($result);
?>

yea..here is my suggestion...don't use internet explorer..lol

 

no seriously...your width="55%" in side<table> is not compliant with the latest specification laid out by W3C

 

try this instead

<table cellpadding="0" cellspacing="0" style="width: 55%; height: 1px">

 

lmao. that is my usual suggestion to all friends, anytime i go over a friends house and they dont have firefox. i install it on their pc...plus if they dont, i have ads on my site and use the google referral and earn a dollar for them using firefox ;-) they always thank me for it later though. haha

 

 

----back on topic :P

 

i tried taking out the \n and in internet explorer that made it a little better. but didnt fix it.

 

and i tried your suggestion Zaid. and it works in firefox. but doesnt help out in internet explorer :\

  Quote

lmao. that is my usual suggestion to all friends, anytime i go over a friends house and they dont have firefox. i install it on their pc...plus if they dont, i have ads on my site and use the google referral and earn a dollar for them using firefox ;-) they always thank me for it later though. haha

 

 

----back on topic :P

 

i tried taking out the \n and in internet explorer that made it a little better. but didnt fix it.

 

and i tried your suggestion Zaid. and it works in firefox. but doesnt help out in internet explorer :\

 

<div align="center"> ??? where did you get that from? I don't think you can do that, no such thing as centering a div( there are other ways) but not align="center" like tables, try removing the div

i have been aligning divs like that for a while...it always seemed as thought it worked lol. anyways

 

using this code:

<table cellpadding="0" cellspacing="0" style="width: 55%; height: 1px;">
  <tr>
    <td align="center">
<img src="../images/aimicons.png"><br />

	<?php
	include '../incl/db.php';
	$result = mysql_query("SELECT * FROM aimicons ORDER BY id DESC");
while ($row = mysql_fetch_object($result)) {
echo "<img src=\"aimicons/" .$row->image. "\" border=\"1\"> ";
}

mysql_free_result($result);
?>

</td>
  </tr>
</table>

 

i get these results:

firefox:

untitledld3.jpg

 

internet explorer:

untitled2be3.jpg

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.