PDA

View Full Version : Floating layer


Dario
11-18-2002, 03:32 PM
Hi,

I have found script about floating layer menu that is typically used for menus.

Here is the script:
http://www.echoecho.com/print.cgi

The script has only three possible positions of the floating menu for top, middle and bottom: left, center and right.

I want to insert that layer into table cell and not to place it in the left, center or right position on the page. How can I do that?
Thanks

allison
11-18-2002, 04:28 PM
can you provide the link or code to the html file you currently have?

allison

jonathan
11-18-2002, 04:34 PM
Well the page didn't want to open for me so I'm just guessing how the person got to put the layer in those three positions. Most likely they used javascript to calculate the width of the screen and then used that number to get the right and middle for the positions. Then they put those numbers in the style for that layer under "absolute" positioning. What you are looking at would be "relative" positioning. You can declare this in your Style sheet or in a style tag on that layer. Here's what it would look like in the style sheet.

#LayerId { position: relative; z-index: 2; top: 0px; left: 0px; width: 100%; height: 100%; visibility: visible; display: block }

and in the style tag have it like this <div id="LayerId" style="position: relative; z-index: 2; top: 0px; left: 0px; width: 100%; height: 100%; visibility: visible; display: block;"></div>
Again I couldn't see the codeing so I don't know for sure, but I would look around with the cascading style sheet. Hope that helps a little.

Dario
11-19-2002, 11:37 AM
Here is the URL of mine:

http://plus.mojsite.com/~zdvor/menu_price_2.html

I want that this picture (cook cap) is always at the right place i.e. centered in the table's cell regardless of the window's size. And please let me know how to initially place it in the same line as is "Warm Hors d'Oeuvres" and "kn" in the menu.

thanks Dario