Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with Show / Hide Layers

Status
Not open for further replies.

kdumas

Technical User
Jul 8, 2004
17
0
0
US
I'm attempting to create a link that when you mouseover it, it will show a layer with a graphic. I've finally figured out how to do this but I want this layer to show up in an exact place on the page. Right now, the location of the layer pops up in different places depending on whether the browser is minimized or maximized. I want it to show up right under the link or maybe a little to the right. It seems like I should be able to draw the layer and have it appear right where I draw it but that is not the case. Please see:


to see what I'm talking about.

Thanks.
 
dont see the problem -- and im not going to click on every link -- where is this problem located
 
Hi Darrync,

You'll see "Attorney Services" in the blue area on the left. When you mouseover it, you should see a box pop up.

Kim
 
and it does.Right now it behaves more as "tool-tip" vs. a menu.....
Are u looking more into direction of "fly-out menu"?
then look through this:

All the best!

:--------------------------------------------------------------------------:
fugitive.gif

ok,ok...I did shoot the deputy but he told me he was the sheriff!
:--------------------------------------------------------------------------:
 
Hi Lebisol,

I don't really want to make it a menu. My client just wanted to have a graphic pop up that lists the different services and he wanted it in this blue area.

The thing I wanted to control is where the box shows up. If I have my window maximized, the pop up box shows up to the left of the table - not where I want it:


Then, if the browser window is minimized, it shows up down below and to the right - this is still not really where I want it but it's getting closer:


I suppose if I can't stick the pop up exactly where I want it, I could use the menu option and put in a graphic instead of a text link. It just seems like it should stay where I put it and not float all over the place. Do you know of any way to keep it put?
 
OK, it makes perfect sense....aka "tool-tips"

There are a few things to consider:
- each browser has its own quirks so ur really looking for happy medium of good looks

- DIVs -layers tend to be misleading when working in Desing View since u can drag and "poition" layer anywhere u want on the page. The problem here is that 'postion' the way u see it does not relfect where the layer is in the code with respect to the rest of the elements in the page.
so, in your case code reads:
Code:
<BODY background="images/blue-pinstripes.jpg" LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<div id="attorneyservices" style="position:absolute; left:175px; top:381px; width:135px; height:94px; z-index:1; visibility: hidden;">
so from 'code perspective' this layer is the very 1st thing ...even before the main Table that holds your page.

as far as Browser is concerend this "works" since u can use the position coordiantes to adjust layer placement.
I would suggest that u think of layers much like u do of cells in a table...in other words, if this layer should be "seen" somewhere in the middle of the table then place the code "<div=..." in the place where u invisoined it...whihch would be in some cell in your table NOT at the top like u have it.
Also, look through DW help about 'DIV' tags or 'Layers' and especially the properties of "position:absolute" vs. relative....
in short, position:absolute will make sure that your layer is at the same distance with respect to Browser window...u can test this by reseizing the window and see that the distance from the window is the same(absolute).....
DW Help also has a a few samples to look at...u will get the idea ones u campare "relative vs. absolute"


All the best!

:--------------------------------------------------------------------------:
fugitive.gif

ok,ok...I did shoot the deputy but he told me he was the sheriff!
:--------------------------------------------------------------------------:
 
Use nested layers. Nest the "popups" inside the menu bar layer. The position of the nested layers will then remain constant in relation to the menu buttons.

Hold down the Alt button when creating the sub layers in order to nest them.

Peace



BT
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top