Position absolute and z-index query

Discussion in 'HTML' started by KiwiBrian, Feb 6, 2008.

  1. KiwiBrian

    KiwiBrian Guest

    In the following page I want to place the graphic of the golf-ball in the
    right-hand cell of a single row 2 column table.
    I want to be able to superimpose text over it.
    What method should I have used?
    The page shows my attempt to absolutely position the image.
    I gather that the enclosing cell or table needs to be relatively positioned
    to support the use of z-index.
    The page displays as I expect in IE7 but in FF I am unable to get the image
    to recognize the table, or cell, even when they are retively positioned, as
    an enclosing element.
    I would welcome advice regarding the problem, and/or how I should have
    accomplished my objective.
    http://homepages.ihug.co.nz/~briantoz/index.html
     
    KiwiBrian, Feb 6, 2008
    #1
    1. Advertising

  2. KiwiBrian

    rf Guest

    "KiwiBrian" <> wrote in message
    news:foauoa$mfo$...
    > In the following page I want to place the graphic of the golf-ball in the
    > right-hand cell of a single row 2 column table.
    > I want to be able to superimpose text over it.
    > What method should I have used?
    > The page shows my attempt to absolutely position the image.
    > I gather that the enclosing cell or table needs to be relatively
    > positioned to support the use of z-index.
    > The page displays as I expect in IE7 but in FF I am unable to get the
    > image to recognize the table, or cell, even when they are retively
    > positioned, as an enclosing element.
    > I would welcome advice regarding the problem, and/or how I should have
    > accomplished my objective.
    > http://homepages.ihug.co.nz/~briantoz/index.html


    http://www.w3.org/TR/CSS21/visuren.html#propdef-position

    "Position: relative on ..., table-cell, ... is undefined.

    So, position: relative on that cell does *not* establish a new containing
    block so your positioning of the golf ball is relative to the <body>. Of
    course IE is getting this wrong :)

    Put everything inside that div, relatively position the div and absolutetly
    position the golf ball inside the div.

    BTW why do you specify a font size that is less that two thirds of my
    prefered font size?

    --
    Richard.
     
    rf, Feb 6, 2008
    #2
    1. Advertising

  3. KiwiBrian

    KiwiBrian Guest

    "rf" <> wrote in message
    news:7s8qj.11710$...
    >
    > "KiwiBrian" <> wrote in message
    > news:foauoa$mfo$...
    >> In the following page I want to place the graphic of the golf-ball in the
    >> right-hand cell of a single row 2 column table.
    >> I want to be able to superimpose text over it.
    >> What method should I have used?
    >> The page shows my attempt to absolutely position the image.
    >> I gather that the enclosing cell or table needs to be relatively
    >> positioned to support the use of z-index.
    >> The page displays as I expect in IE7 but in FF I am unable to get the
    >> image to recognize the table, or cell, even when they are retively
    >> positioned, as an enclosing element.
    >> I would welcome advice regarding the problem, and/or how I should have
    >> accomplished my objective.
    >> http://homepages.ihug.co.nz/~briantoz/index.html

    >
    > http://www.w3.org/TR/CSS21/visuren.html#propdef-position
    >
    > "Position: relative on ..., table-cell, ... is undefined.
    >
    > So, position: relative on that cell does *not* establish a new containing
    > block so your positioning of the golf ball is relative to the <body>. Of
    > course IE is getting this wrong :)
    >
    > Put everything inside that div, relatively position the div and
    > absolutetly position the golf ball inside the div.


    Marvelous.
    Richard to the rescue again.
    Don't leave town.
     
    KiwiBrian, Feb 6, 2008
    #3
  4. KiwiBrian

    dorayme Guest

    In article <fob7gm$rr2$>,
    "KiwiBrian" <> wrote:

    > Marvelous.
    > Richard to the rescue again.
    > Don't leave town.


    Be careful. He knows some of the best NZ jokes and you might not
    like them.

    --
    dorayme
     
    dorayme, Feb 6, 2008
    #4
  5. KiwiBrian

    rf Guest

    "dorayme" <> wrote in message
    news:...
    > In article <fob7gm$rr2$>,
    > "KiwiBrian" <> wrote:
    >
    >> Marvelous.
    >> Richard to the rescue again.
    >> Don't leave town.

    >
    > Be careful. He knows some of the best NZ jokes and you might not
    > like them.


    I haven't mentioned sheep in *ages* :)

    --
    Richard.
     
    rf, Feb 6, 2008
    #5
  6. KiwiBrian

    KiwiBrian Guest

    "rf" <> wrote in message
    news:eE9qj.11752$...
    >
    > "dorayme" <> wrote in message
    > news:...
    >> In article <fob7gm$rr2$>,
    >> "KiwiBrian" <> wrote:
    >>
    >>> Marvelous.
    >>> Richard to the rescue again.
    >>> Don't leave town.

    >>
    >> Be careful. He knows some of the best NZ jokes and you might not
    >> like them.

    >
    > I haven't mentioned sheep in *ages* :)


    How about convicts? :)
     
    KiwiBrian, Feb 6, 2008
    #6
  7. KiwiBrian

    dorayme Guest

    In article <eE9qj.11752$>,
    "rf" <> wrote:

    > "dorayme" <> wrote in message
    > news:...
    > > In article <fob7gm$rr2$>,
    > > "KiwiBrian" <> wrote:
    > >
    > >> Marvelous.
    > >> Richard to the rescue again.
    > >> Don't leave town.

    > >
    > > Be careful. He knows some of the best NZ jokes and you might not
    > > like them.

    >
    > I haven't mentioned sheep in *ages* :)


    That was one of the ones that crossed my mind.

    --
    dorayme
     
    dorayme, Feb 6, 2008
    #7
  8. KiwiBrian

    Ben C Guest

    On 2008-02-06, rf <> wrote:
    >
    > "KiwiBrian" <> wrote in message
    > news:foauoa$mfo$...
    >> In the following page I want to place the graphic of the golf-ball in the
    >> right-hand cell of a single row 2 column table.
    >> I want to be able to superimpose text over it.
    >> What method should I have used?
    >> The page shows my attempt to absolutely position the image.
    >> I gather that the enclosing cell or table needs to be relatively
    >> positioned to support the use of z-index.
    >> The page displays as I expect in IE7 but in FF I am unable to get the
    >> image to recognize the table, or cell, even when they are retively
    >> positioned, as an enclosing element.
    >> I would welcome advice regarding the problem, and/or how I should have
    >> accomplished my objective.
    >> http://homepages.ihug.co.nz/~briantoz/index.html

    >
    > http://www.w3.org/TR/CSS21/visuren.html#propdef-position
    >
    > "Position: relative on ..., table-cell, ... is undefined.
    >
    > So, position: relative on that cell does *not* establish a new containing
    > block so your positioning of the golf ball is relative to the <body>. Of
    > course IE is getting this wrong :)


    It's not wrong. The effect of position: relative on table-cell is
    undefined, so if IE allows it to establish a containing block for
    positioned descendents, that's also correct.

    In fact I'm with IE on this one. A reasonable browser would not allow
    table-cells to actually have relative offsets, but would let them be
    positioned containing blocks.

    After all even inline boxes are supposed to be able to be positioned
    containing blocks, which is mad since they break across lines and can
    end up with their right edges to the left of their left edges.

    Furthermore if you look at the definition of containing block (in
    9.1.2), it says, "the nearest ancestor with a position of absolute,
    relative or fixed".

    The position property does apply to table-cells, it applies to all
    elements. So then you have to ask is establishing a containing block for
    positioned descendents strictly an _effect_ of that element? Or just a
    fact about it?

    It's slightly ambiguous but reading 9.1.2 there's no real excuse for not
    allowing table-cells to be containing blocks.
     
    Ben C, Feb 6, 2008
    #8
  9. KiwiBrian

    Bergamot Guest

    KiwiBrian wrote:
    > In the following page I want to place the graphic of the golf-ball in the
    > right-hand cell of a single row 2 column table.
    > I want to be able to superimpose text over it.
    > What method should I have used?
    > http://homepages.ihug.co.nz/~briantoz/index.html


    Put the image in the background. Drop the layout table and it might
    actually be easier to style.

    --
    Berg
     
    Bergamot, Feb 6, 2008
    #9
    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:
    662
    Luqman
    Feb 7, 2006
  2. david graham

    IE5.5 and absolute position of a div

    david graham, Sep 11, 2003, in forum: HTML
    Replies:
    11
    Views:
    923
  3. TadPole
    Replies:
    0
    Views:
    437
    TadPole
    Nov 8, 2005
  4. James Byrne
    Replies:
    3
    Views:
    577
    James Byrne
    Sep 14, 2010
  5. Tomasz Chmielewski

    sorting index-15, index-9, index-110 "the human way"?

    Tomasz Chmielewski, Mar 4, 2008, in forum: Perl Misc
    Replies:
    4
    Views:
    321
    Tomasz Chmielewski
    Mar 4, 2008
Loading...

Share This Page