Does anyone know much about dhtml layers? I have a gif I want to whack up =
in the top right corner of this document. I want it to float over the thick =
black borders of the table.
I know I can use the float tag but it only lets me specify the TOP and LEFT =
attributes and I will not know how wide a screen is as the resolution of =
the monitor viewing my blog could be set to any value.
I almost had it working at one stage using a DIV tag but that created a =
blank column on the right hand side of this blog the width of the image. =
Kinda like if you have your TABLE set up right then add an extra TD =
somewhere.
I know it can be done cos I’ve seen snowflakes falling down screens and =
those annoying dhtml logos and menus which scroll down the screen. I don’t =
want mine to stay at the top of the screen, though. Just disappear as a =
normal gif would if you moved the elevator down the screen.
Answers on the back of an envelope and write BRAINS on the front.

March 31st, 2006 at 7:23 pm - Edit
A DIV will work but the CSS has to specify either (a) “position: absolute”, or (b) “float: right”. Either one will do the job in general but there are slight differences in appearance between the two.
March 31st, 2006 at 7:40 pm - Edit
Yea. That’s what I used, but the problem is when I used DIV at the top and float:right.. it worked but the white table where the normal blog appears shrunk left on the right hand side the width of the image
+++++++++***
+++++++++***
=========
=========
=========
=========
=== = blog moved left
*** = img
I think absolute means I have to specify TOP and LEFT which means I can’t use that cos I don’t know how many pixels from the left margin to move it across.
March 31st, 2006 at 9:08 pm - Edit
*smiles* you could set a layer with a right: 0px - this will align it right depending on your positioning
March 31st, 2006 at 10:12 pm - Edit
Actually, with absolute you could specify top and right. You only need to specify enough for the browser to figure out the others.
April 1st, 2006 at 6:01 pm - Edit
Thanks for the help. I got it going, but not the way I wanted to. It works tho so that’s the main thing
I was hoping I could do the lot in a css stylesheet file for the image and not specify the absolute location of the image. It didn’t seem to work if I used DIV ID= or DIV STYLE= and have the lot in the css file.
But, never mind. The image is there
PS: Thanks for the right:0; all the sites I read only mentioned TOP & LEFT but no RIGHT anywhere.
April 3rd, 2006 at 11:34 am - Edit
Yeah, sometimes reading the CSS spec is the only way to find these things out.
It’s also a good way to find bugs in the web browser, e.g. “bottom” is practically useless in a certain Windows-based one which sucks.