View Full Version : Correctly size JavaScripts...?

07-03-2003, 05:24 PM
I have a javascript navbar that I have correctly placed in a 1024px resolution according to pixels. I recently realized that when the page is viewed in different resolutions, the nav bar gets all funky. I tried replacing the "100" with a "100%" (like you would do for a table), but that just gave my page a huge error and the script wouldn't load! Does anyone know how I can make a % sized version of this:
slideMenu.menuy=100 //top placement of the menu

:confused: :confused:

I know you can do it in css, but I don't know css. So if the only way to do it is in css, then it would be great if you just provided me with the code instead of telling me to figure it out on my own...



07-03-2003, 05:28 PM

I guess a more reasonable size would be screen.width-100 or something.

07-03-2003, 05:50 PM
Are you sure that will work? I mean, I am working with the vertical placement of this element, not it's width. I know that CSS has to do with the layout of the page, so shouldn't it also control the size of the layout of the page? Or am I mixing layout with content? What I'm trying to ask is this:

Is there a way to make my nav bar "resize" in proportion with the user's resolution and/or screensize? I not only want the nav bar's size to stay in proportion to the resolution and/or screensize, but I also want the nav bar's position to be in that proportion, too.

If you need to see a working example of what I mean, go to
http://www.webpropertiesinc.com and check out the nav bar on the left's source.

Thanks again!