Closed Thread Icon

Preserved Topic: Something about layers (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=18225" title="Pages that link to Preserved Topic: Something about layers (Page 1 of 1)" rel="nofollow" >Preserved Topic: Something about layers <span class="small">(Page 1 of 1)</span>\

 
Wakkos
Maniac (V) Mad Scientist

From: Azylum's Secret Lab
Insane since: Oct 2000

posted posted 08-04-2001 21:03

I got this:

}
function showLayer(layerName){
eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');
}

function hideLayer(layerName){
eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
}


Then i set up the layer in their position in the style section like this:
#layer1 {POSITION: absolute; Z-INDEX: 10; VISIBILITY: visible; LEFT: 500px; TOP: 100px;}

So, i write the layer in the body section:
<DIV ID="layer2" >
<a href="files/acuarela.atn">
<IMG SRC="imagenes/thumb/acuarela.gif" WIDTH=114 HEIGHT=152 BORDER=0>
</DIV>



Are we going ok? ok....

That works very nice, but i want to put the layer into a table cell, not into an absolute position, so when i work with relatives sizes, i the layer will be always where i want it (i want to make a mouse-over menu with this)

I don't know anything on hoe to do this, remember i've lost all my little practice, but if you know where can i find some information about this, i will try to solve it!!

Thanks!!


.-rotate script by Mr.Max

lallous
Paranoid (IV) Inmate

From: Lebanon
Insane since: May 2001

posted posted 08-04-2001 22:18

I use dhtmllib.js to call some layer manipulation function (becaue dhtmllib.js is cross browser compatible)

Okay, ...now to put that absolute layer in a cell:

1)Place an image tag in the cell (it might be a transparent 1pixel gif file). Remember we only put it to get it's position later.

2)document.onload = repositionmylayers;

code:
function repositionmylayers()
{
i = findImage("imgpositioner", window.document);
l = getLayer("layer1");
x = getImagePageLeft(i);
y = getImagePageTop(i);
moveLayerTo(l, x, y);
}



That's basically what you need to reposition your layer.

DmS
Paranoid (IV) Inmate

From: Sthlm, Sweden
Insane since: Oct 2000

posted posted 08-05-2001 00:48

Iallous, I didn't get your post... (not that it was I who asked, but still)

As far as I know, all you have to do is to place the DIV tag inside the actual table cells code, just as any other text, then put POSITION: relative; LEFT: 1px; TOP: 1px; in the style section of the div.

This would place the layer 1px down from the top, and 1px left from the cells upper left corner.
Then you can center the page and whatnot, the layer will still be place relatively to this cells upper left corner.
The only thing is that the DIV actually reserves space on the page, meaning that if you have a lot of content in the DIV, you will resize the table cell. Is this the issue you are adressing?
/Dan


Wakkos
Maniac (V) Mad Scientist

From: Azylum's Secret Lab
Insane since: Oct 2000

posted posted 08-05-2001 01:13

Hey lallous, that's a little bit complicated to my brain, anyway, i think that DmS is right, i'll try that and then i'll post back....

Thank! but new ideas are still wellcome!


.-rotate script by Mr.Max

« BackwardsOnwards »

Show Forum Drop Down Menu