Relative position text in FF...
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" />
<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>
<img src="Images/
assetFooter.jpg" style="width:802px" /></td></tr>
</table>
Re: Relative position text in FF...
hzgt9b wrote:
> - 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.)
--
-bts
-Motorcycles defy gravity; cars just suck
Re: Relative position text in FF...
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" />
<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>
<img src="Images/assetFooter.jpg" style="width:
802px" /></td></tr>
</table>
Re: Relative position text in FF...
In article
<463dc548-cc08-4d8a-8ed0-b444ff6277c2 [at] e1g2000hsh.googlegroups.com
>,
hzgt9b <celoftis [at] gmail.com> wrote:
> 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" />
<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>
<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.
--
dorayme
Re: Relative position text in FF...
hzgt9b wrote:
>
> <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" />
<span id="lblHeader"
> style="position:relative;top:-47%;left:7%;
<shudder> I don't even want to know what that relative positioning is
supposed to be doing. It can't possibly be The Right Thing to do.
> 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.
--
Berg