Relative position text in FF...

Discussion in 'HTML' started by hzgt9b, Nov 20, 2007.

  1. hzgt9b

    hzgt9b Guest

    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>
    hzgt9b, Nov 20, 2007
    #1
    1. Advertising

  2. 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
    Beauregard T. Shagnasty, Nov 20, 2007
    #2
    1. Advertising

  3. hzgt9b

    hzgt9b Guest

    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>
    hzgt9b, Nov 20, 2007
    #3
  4. hzgt9b

    dorayme Guest

    In article
    <
    >,

    hzgt9b <> 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" /><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.

    --
    dorayme
    dorayme, Nov 20, 2007
    #4
  5. hzgt9b

    Bergamot Guest

    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" /><br /><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
    Bergamot, Nov 20, 2007
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Luqman
    Replies:
    1
    Views:
    642
    Luqman
    Feb 7, 2006
  2. MAB
    Replies:
    31
    Views:
    26,880
    chrisbster
    May 13, 2009
  3. Dr.Gizmo

    position: relative

    Dr.Gizmo, Apr 12, 2004, in forum: HTML
    Replies:
    2
    Views:
    662
    Toby A Inkster
    Apr 12, 2004
  4. Jan Clemens Faerber

    position:relative

    Jan Clemens Faerber, Sep 3, 2004, in forum: HTML
    Replies:
    10
    Views:
    884
    Jan Clemens Faerber
    Sep 8, 2004
  5. celoftis

    Relative position text in FF...

    celoftis, Nov 20, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    280
    celoftis
    Nov 20, 2007
Loading...

Share This Page