problem with browser

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shivendravikramsingh
    New Member
    • Jun 2007
    • 19

    #1

    problem with browser

    heelo friens. i have a problem,actuall y i saved the path of an image file in a database,when i fetch it and try to display in a table,its work fine with I.E but image is not shown in mozilla and opera,pls help me its urgent.
    the code is:
    [code=php]
    <table>
    <tr>
    <td width="37%" rowspan="4" align="center" valign="middle" ><img name="customeri mage" src="<? echo $customerimage; ?>" id="customerima ge" width="86" height="100" ></td>
    </tr>
    <table>
    <? echo $customerimage; ?>
    [/code]
    i fetch the path of image file in a variable $customerimage from database.
    Last edited by Atli; Aug 18 '07, 01:18 PM. Reason: Added code tags
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    Hi.

    I can't see any major errors there. There are a couple of things you could try tho.

    First, all tags should be closed, either like this '<tag></tag>' or like this '<tag />'. So try closing the <img> tag, like so:
    [code=html]
    <img src="myimg.jpg" alt="" />
    [/code]

    Second, Try to avoid using properties in the HTML tags them selfs, like the 'width' or 'height' properties. Instead either use the 'style' property and set the width and height there. Or create a CSS document with the styles.
    Try this:
    [code=html]
    <img src="myimg.jpg" alt="" style="width: 100px; height: 75px;" />
    [/code]

    IE seems to have a greater tolerance for minor "errors" like these than Mozilla or Opera so I would avoid using IE for testing code (tho I would still make sure it works on IE)

    Comment

    Working...