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
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);
?>

Link to comment
Share on other sites

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">

 

Link to comment
Share on other sites

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 :\

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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