Colin has attended:
No courses
Positioning of layers
I am designing a web page which will be loaded onto my company intranet site. I have a layer containing a dropdown menu which I have aligned with some text in a cell. Unfortunately, the company website has a collapsable menu down the left hand side and if I collapse the menu, although my cell and all the text is now up against the left hand margin, the container for the layer is not "tied" to the cell so it moves a different amount and therefore no longer lines up with the data in the cell.
Nothing I can see in the layer properties seems to allow me to "lock" the layer so that it moves the same amount as eveything else when the manu is collapsed.
Can anyone tell me how to resolve this?
Many thanks
RE: Positioning of layers
Hi Colin,
That's a tricky one.
If you have 'absolute' positioning of your layers, then they are going to appear at the exact X and Y coordinates you specify. Even in different browsers, this can look different, regardless of if you had the collapsable menu down the left side.
I would say the trick is to get it to be 10 pixels (or whatever) below another DIV or element. So that if that element gets moved (for whatever reason, left collapsible included), then the pop up menu/layer will also move.
You may want to use a menu system such as http://www.milonic.com , which we use on our homepage - it seems to handle window resize and other elements perfectly. (They have a free trial, and in some cases you can get free licences).
Another option is to set some kind of JavaScript value to change or load a different style sheet for your layer whenever the collapsible sidebar is turned on or off, but this could get messy.
It's hard to give any more advice without seeing the page or code. If you paste the URL of the page, I may be able to help further.
Regards, Rich