MikeDXUNL Posted April 11, 2007 Share Posted April 11, 2007 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 More sharing options...
only one Posted April 11, 2007 Share Posted April 11, 2007 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 https://forums.phpfreaks.com/topic/46640-results-display-strangely/#findComment-227148 Share on other sites More sharing options...
Zaid Posted April 11, 2007 Share Posted April 11, 2007 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 https://forums.phpfreaks.com/topic/46640-results-display-strangely/#findComment-227149 Share on other sites More sharing options...
per1os Posted April 11, 2007 Share Posted April 11, 2007 This is really an HTML/CSS issue as PHP does not have anything to do with the way data is displayed. Link to comment https://forums.phpfreaks.com/topic/46640-results-display-strangely/#findComment-227152 Share on other sites More sharing options...
MikeDXUNL Posted April 11, 2007 Author Share Posted April 11, 2007 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 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 https://forums.phpfreaks.com/topic/46640-results-display-strangely/#findComment-227153 Share on other sites More sharing options...
Zaid Posted April 11, 2007 Share Posted April 11, 2007 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 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 https://forums.phpfreaks.com/topic/46640-results-display-strangely/#findComment-227156 Share on other sites More sharing options...
MikeDXUNL Posted April 11, 2007 Author Share Posted April 11, 2007 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: internet explorer: Link to comment https://forums.phpfreaks.com/topic/46640-results-display-strangely/#findComment-227185 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.