Layers - What's wrong

Discussion in 'HTML' started by Michael Satterwhite, Mar 1, 2005.

  1. I'd like to be able to position an element coincident with the upper left
    hand corner of another. Could be overlayed text, image, whatever. It was my
    understanding that layers could be used for this, but I'm clearly doing
    something wrong. An example page - with styles exposed - is at

    www.weblore.com/lindinger/about.html

    I'd like the text at the bottom to appear in the upper left hand corner of
    the screen. It's appearing at the bottom of the screen instead. I'm
    obviously missing something. Would someone be so kind as to point out the
    error of my ways?

    tia
    ---Michael
     
    Michael Satterwhite, Mar 1, 2005
    #1
    1. Advertising

  2. Michael Satterwhite

    Steve Pugh Guest

    Michael Satterwhite <satterwh.X$NO$S$> wrote:

    >I'd like to be able to position an element coincident with the upper left
    >hand corner of another. Could be overlayed text, image, whatever. It was my
    >understanding that layers could be used for this,


    There's no such thing as a layer in HTML/CSS.

    Netscape 4 had a <layer> element but that is ancient history.

    Dreamweaver describes positioned <div>s as layers but it's misleading
    (not least for the fact that it seems to cause a mindset in certain
    people where they think that (a) only divs can be positioned and (b)
    divs are only for positioning and nothing else).

    At it's most harmless layer can be taken to mean any positioned
    element. So why not just say that?

    >but I'm clearly doing
    >something wrong. An example page - with styles exposed - is at
    >
    > www.weblore.com/lindinger/about.html
    >
    >I'd like the text at the bottom to appear in the upper left hand corner of
    >the screen. It's appearing at the bottom of the screen instead. I'm
    >obviously missing something. Would someone be so kind as to point out the
    >error of my ways?


    positioning: absolute should be position: absolute

    You also have no need to position the first div in your page at all.
    Remove the body margins and padding and that div will sit snug in the
    top left corner without any need for absolute positioning.

    Steve

    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <> <http://steve.pugh.net/>
     
    Steve Pugh, Mar 1, 2005
    #2
    1. Advertising

  3. Re: Layers - What's wrong - Fixed (and thanks)

    Steve Pugh wrote:

    >
    > positioning: absolute should be position: absolute
    >
    > You also have no need to position the first div in your page at all.
    > Remove the body margins and padding and that div will sit snug in the
    > top left corner without any need for absolute positioning.


    Thanks much, Steve. I appreciate the help!

    ---Michael
     
    Michael Satterwhite, Mar 1, 2005
    #3
    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. Mike

    3-tier data layers seperation

    Mike, Feb 28, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    462
    Joe Fallon
    Mar 1, 2005
  2. =?Utf-8?B?SSBhbSBTYW0=?=

    DataRelation on Multible layers of DataRelations

    =?Utf-8?B?SSBhbSBTYW0=?=, Mar 5, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    537
    Karl Seguin
    Mar 6, 2005
  3. =?Utf-8?B?cmlnYQ==?=

    3 layers that do nothing except calling each other

    =?Utf-8?B?cmlnYQ==?=, Mar 1, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    367
    sloan
    Mar 2, 2006
  4. Jan Brunia
    Replies:
    1
    Views:
    554
    Pronab Pal
    Feb 10, 2004
  5. Stijn Goris

    css layers

    Stijn Goris, Aug 15, 2003, in forum: HTML
    Replies:
    1
    Views:
    449
    David Dorward
    Aug 15, 2003
Loading...

Share This Page