Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bug or not?

Status
Not open for further replies.

drkestrel

MIS
Sep 25, 2000
439
GB
I have the following HTML which works
Code:
    <table width=&quot;95%&quot; border=1>
        <tr height=&quot;22&quot; width=&quot;510&quot;>
            <td>asd asd asd asd asd asd asd asd asd<SPAN STYLE=&quot;position:relative; top:-1px; left:-50px&quot;>overlayed text 

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

It displays overlayed text on top of &quot;asd...asd&quot;.

However, if I use an image instead of &quot;asd...asd&quot;
Code:
    <table width=&quot;95%&quot; border=1>
        <tr height=&quot;22&quot;>
            <td>
            
            <img src=&quot;../Images/small_grey_square.gif&quot; height=22 width=510><SPAN STYLE=&quot;position:relative; top:-10px; left:-500px&quot;>overlayed text </SPAN></td>
        </tr>
    </table>
where small_grey_square.gif is a 10 x 10 pixel image that is 'scretched' out to 510 x 22. Any text after the space in &quot;overlayed text&quot; is omitted.

How/Why is that and how could I solve it?
 
I don't fully understand what you mean by &quot;any text after the space in overlayed text is omitted&quot; You don't have any text after &quot;overlayed text&quot;?????

It's not a very good idea to specify the width of the table in percentage and the width of the tabledata in pixels. Best to stick to one or the other. What's taking up the rest of the table if it stretches more than 510 pixels wide?
 
drkestrel,
>>Any text after the space in &quot;overlayed text&quot; is omitted.
Explain yourself clearly.
I added more text to the <span> and also between </span> and closing </td> - all the text is displayed.
Also, why don't you tell where do you test? Or maybe you think that it's IE by default? If yes, forget about it.

y2k1981,
About table elements measurement units:
it doesn't matter what are you using, the main thing is to achieve the goal. There are many cases where you have to use both % and pixels.
 
What I mean is the any text after the space immediately after &quot;overlayed&quot; is not displayed. i.e. &quot; text&quot; is not displayed.

starway,
When you say you added more text to the <span> and also between </span> and closing </td> - all the text is displayed, is your text overlayed on top of a stretched small image file i.e. something like the following
Code:
    <table width=&quot;95%&quot; border=1>
        <tr height=&quot;22&quot;>
            <td>
            
            <img src=&quot;../Images/small_grey_square.gif&quot; height=22 width=510><SPAN STYLE=&quot;position:relative; top:-10px; left:-500px&quot;>a longer overlayed text </SPAN></td>
        </tr>
    </table>

I have tested in IE6.0.
 
The text I added is displayed over the stretched image, if it's inside <span>.
If it's between </span> and closing </td> - text is displayed to the right of the image.

Tested in Opera 6, IE5, Mozilla - and everywhere I see the same picture.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top