michaelwl Posted July 30, 2007 Share Posted July 30, 2007 Why doesn't the code below make the image (<img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1">) the correct size on my page? My PHP script seems to be generating it correctly can't see why it's not being displayed correctly. <script type="text/javascript"> document.write(" <TR> <TD> "); <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td height="14" class="infoBoxHeading"><img src="images/infobox/corner_left.gif" border="0" alt="" width="11" height="14"></td> <td width="100%" height="14" class="infoBoxHeading">Categories</td> <td height="14" class="infoBoxHeading" nowrap><img src="images/pixel_trans.gif" border="0" alt="" width="11" height="14"></td> </tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="3" class="infoBoxContents"> <tr> <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td> </tr> <tr> <td class="boxText"> <img src="images/trans.gif" width="150" height="60.95"></td> </tr> <tr> <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td> </tr> </table> </td> </tr> </table> document.write(""); document.write(" <\/TD> <\/TR> "); </script> Quote Link to comment https://forums.phpfreaks.com/topic/62470-why-is-my-html-reacting-like-this/ Share on other sites More sharing options...
thedarkwinter Posted July 30, 2007 Share Posted July 30, 2007 maybe you can try making the <td width='100%'> also, try doing it without the css, and see if that helps Quote Link to comment https://forums.phpfreaks.com/topic/62470-why-is-my-html-reacting-like-this/#findComment-310884 Share on other sites More sharing options...
michaelwl Posted August 2, 2007 Author Share Posted August 2, 2007 Tried that still is not appearing... I'm killing myself trying to get this right. Anyone have any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/62470-why-is-my-html-reacting-like-this/#findComment-313837 Share on other sites More sharing options...
DeadEvil Posted August 2, 2007 Share Posted August 2, 2007 try document.write(" <TR> <TD width='100%'> "); Quote Link to comment https://forums.phpfreaks.com/topic/62470-why-is-my-html-reacting-like-this/#findComment-313838 Share on other sites More sharing options...
Crew-Portal Posted August 2, 2007 Share Posted August 2, 2007 Yo did not end off your Javascript Tags Try: <script type="text/javascript"> document.write(" <TR> <TD> "); </script> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td height="14" class="infoBoxHeading"><img src="images/infobox/corner_left.gif" border="0" alt="" width="11" height="14"></td> <td width="100%" height="14" class="infoBoxHeading">Categories</td> <td height="14" class="infoBoxHeading" nowrap><img src="images/pixel_trans.gif" border="0" alt="" width="11" height="14"></td> </tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="3" class="infoBoxContents"> <tr> <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td> </tr> <tr> <td class="boxText"> <img src="images/trans.gif" width="150" height="60.95"></td> </tr> <tr> <td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="1"></td> </tr> </table> </td> </tr> </table> <script type="text/javascript"> document.write(""); document.write(" <\/TD> <\/TR> "); </script> Quote Link to comment https://forums.phpfreaks.com/topic/62470-why-is-my-html-reacting-like-this/#findComment-314173 Share on other sites More sharing options...
ToonMariner Posted August 3, 2007 Share Posted August 3, 2007 is it stretching your image????? width 100% will make the image as wide as the width of the parent elment... Quote Link to comment https://forums.phpfreaks.com/topic/62470-why-is-my-html-reacting-like-this/#findComment-315012 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.