Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Layers - What's wrong
- Michael Satterwhite
March 1, 2005, 3:42 pm
rate this thread
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
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?
Re: Layers - What's wrong
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?
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.
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor