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.

6 Responses to “DHTML layers”
  1. Trejkaz says:

    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.

  2. WauloK says:

    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.

  3. BatGrrrL says:

    *smiles* you could set a layer with a right: 0px - this will align it right depending on your positioning :)

  4. Trejkaz says:

    Actually, with absolute you could specify top and right. You only need to specify enough for the browser to figure out the others.

  5. WauloK says:

    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.

  6. Trejkaz says:

    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.

Leave a Reply

Powered by WP Hashcash