I am wondering if their is a way to have a menu positioned using screenposition and offsets until the position goes below a certain point?
Let me try to explain this, on this site: http://next.demandstream.net/test2.cfm I have positioned the "What's New" menu using offsets. (The page must be centered on the browser window to fullfill the designers requirments)
But if I resize the window smaller than the fixed size of the content, my menu starts "moving" up and to the left in relation to it's origional position.
So what I would like to do, is either, define a minimum position top and left or, as an alternative, be able to change the menu position after the fact (onResize, have a function that checks the menu position, them moves it if nessasary)
Thanks in advance.
Moveing a menu after it has been rendered?
You have
in your WhatsNewMenu ('center' and 'middle' should be separated by a semicolon by the way, like "center;middle"). When you narrow the browser window, a horizontal scrollbar appears at the bottom of the window, effectively raising the "middle" of the display area... the menu adjusts its vertical position accordingly. Also, by offsetting vertically from the "middle" you'll probably find that your menu ends up somewhere other than where you want it in different browsers, since the "middle" will differ across browsers.
Did you try setting top to a static position? I.e.,
Instead of 300, use a value that would place the menu where you want. This would be equivalent to offsetting from the top, and the top will not move when a horizontal scrollbar appears.
Let us know if that helps,
Kevin
Code: Select all
screenposition="center,middle";
top="offset=13";
Did you try setting top to a static position? I.e.,
Code: Select all
screenposition="center";
top=300;
Let us know if that helps,
Kevin
The problem with using the top as a static value is the distance from the top to the menu changes depending on the window size. (Content is centered horisontally and vertically in the window)
The postion is fine in all browsers I have tested as long as the window is large enough to fit all the content without scrollbars.
I was hoping that their would be a method to move the menu. I know the static position for when the browser is smaller than the content. But I don't know the static position when the browser is larger. i.e. I would like a "dynamic" position (the way is currently is setup) for larger browser windows and "static" postion for smaller windows.
I know I can determine the location of the menu, so I can determine when the menu is to far "up" and to the "left" of where I want it, but I don't know how to move it back.
I hope this is making sense.
The postion is fine in all browsers I have tested as long as the window is large enough to fit all the content without scrollbars.
I was hoping that their would be a method to move the menu. I know the static position for when the browser is smaller than the content. But I don't know the static position when the browser is larger. i.e. I would like a "dynamic" position (the way is currently is setup) for larger browser windows and "static" postion for smaller windows.
I know I can determine the location of the menu, so I can determine when the menu is to far "up" and to the "left" of where I want it, but I don't know how to move it back.
I hope this is making sense.