Relative position text in FF...

H

hzgt9b

I have two images acting as header and footer in a table, each in
their own table cell. I want to position some text over each image.
Here is what I have come up with - it works in IE but not in FF. In
FF, the text appears in its original location... can someone tell me
what is going on here?

<table style="font-size:14pt;text-align:left;" bgcolor="#FFFFFF"
border="0" cellspacing="0">
<tr><td colspan="3"><img src="Images/assetHeader.jpg" style="width:
802px" /><br /><asp:Label ID="lblHeader" runat="server" Text="THIS IS
MY HEADER TEXT" style="position:relative;top:-47%;left:7%;font-
style:italic;color:#FFFFFF;font-family:Tahoma;font-size:40pt;"></
asp:Label></td></tr>


<!-- OTHER TABLE ROWS HERE -->


<tr><td colspan="3"><asp:Label ID="lblFooter" runat="server" Text="MY
FOOTER" style="position:relative;top:52%;left:80%;color:#000000;font-
family:Tahoma;font-size:17pt;"></asp:Label><br /><img src="Images/
assetFooter.jpg" style="width:802px" /></td></tr>
</table>
 
B

Beauregard T. Shagnasty

hzgt9b said:
- it works in IE but not in FF.
<asp:Label ID="lblHeader" runat="server" Text="THIS IS
MY HEADER TEXT" style="position:relative;top:-47%;left:7%;font-
style:italic;color:#FFFFFF;font-family:Tahoma;font-size:40pt;"></
asp:Label>

What HTML element is <asp:Label> ?

Sounds like a Microsoft thingy to me...

(Hint: Firefox is not a Microsoft browser.)
 
H

hzgt9b

Sorry about that... yes those are ASP tags, the ASP:LABEL control gets
rendered into HTML as a SPAN tag... here's the real HTML output. Now,
same question as before...


<table style="font-size:14pt;text-align:left;" bgcolor="#FFFFFF"
border="0" cellspacing="0">
<tr><td colspan="3"><img src="Images/assetHeader.jpg" style="width:
802px" /><br /><span id="lblHeader"
style="position:relative;top:-47%;left:7%;font-
style:italic;color:#FFFFFF;font-family:Tahoma;font-size:40pt;">THIS IS
MY HEADER TEXT</span></td></tr>


<!-- OTHER TABLE ROWS HERE -->


<tr><td colspan="3"><span id="lblFooter" style="position:relative;top:
52%;left:93%;color:#000000;font-family:Tahoma;font-size:17pt;">MY
FOOTER</span><br /><img src="Images/assetFooter.jpg" style="width:
802px" /></td></tr>
</table>
 
D

dorayme

<[email protected]
hzgt9b said:
Sorry about that... yes those are ASP tags, the ASP:LABEL control gets
rendered into HTML as a SPAN tag... here's the real HTML output. Now,
same question as before...


<table style="font-size:14pt;text-align:left;" bgcolor="#FFFFFF"
border="0" cellspacing="0">
<tr><td colspan="3"><img src="Images/assetHeader.jpg" style="width:
802px" /><br /><span id="lblHeader"
style="position:relative;top:-47%;left:7%;font-
style:italic;color:#FFFFFF;font-family:Tahoma;font-size:40pt;">THIS IS
MY HEADER TEXT</span></td></tr>


<!-- OTHER TABLE ROWS HERE -->


<tr><td colspan="3"><span id="lblFooter" style="position:relative;top:
52%;left:93%;color:#000000;font-family:Tahoma;font-size:17pt;">MY
FOOTER</span><br /><img src="Images/assetFooter.jpg" style="width:
802px" /></td></tr>
</table>

Note that a lot of people will not know what the context of this
is because, for a start, you do not quote who you are replying
to, many of us do not use Google to read newsgroup posts.

Best to make a url with the essentials. What appears in Firefox
with your code does not show any particular problem. (it is
generally problematic... but that is a different story).

Why are you using a table to layout your page? Why are you even
thinking about relative position with a table layout? Why are you
using pts for font-sizes. Search the archives of this group for
these topics first.
 
B

Bergamot

hzgt9b said:
<table style="font-size:14pt;text-align:left;" bgcolor="#FFFFFF"
border="0" cellspacing="0">

A lovely mix of HTML presentational attritubes and inline styles - not.
<tr><td colspan="3"><img src="Images/assetHeader.jpg" style="width:
802px" /><br /><span id="lblHeader"
style="position:relative;top:-47%;left:7%;

font-
style:italic;color:#FFFFFF;font-family:Tahoma;font-size:40pt;">THIS IS
MY HEADER TEXT</span></td></tr>

If that's a table header, why isn't it in a caption element?
This is getting uglier by the minute.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top