How to make frames "floating"

He has: 18 posts

Joined: Sep 2003

I''d like to have a site where one menu is on top, and then below the content of the chosen menuitem is shown. This is easly achived using 'frames'. However, I want the menu to be "stuck" on the page, so when you scroll the page, the _whole_ page is scrolled inclusive the menu. Now I create the menu on every .htm page I have, which foreces me to change the menu of all places if I want a slight change to it. I've heard of iframes and layers, but I've also heard they can be ambivalent on diffrent browsers.

How would I solve this the best way?

Renegade's picture

He has: 3,022 posts

Joined: Oct 2002

Javascriptkit us a really good piece of code which I used once. Its in the menu sub-section of the free javascripts section called "Static Menu".

You can easily edit that to suit what you want it to do.

He has: 18 posts

Joined: Sep 2003

I'm experienced in C++, and that language has a very strict standard. If I want to solve this in a "standard way" it won't go?

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

Using CSS, position:fixed does that. But it's not supported by IE. Sad

The second best alternatives are Javascript and frames. Neither are particularly desirable, but I'd go with the JS.

To solve the multiple-editing problem, you could have the menu data generated by a PHP script, or included using SSI, so you'd have one central set of code to edit to effect the changes across all pages. Smiling

He has: 18 posts

Joined: Sep 2003

IFRAMES or OBJECT, are they not even considerable?

They seem pretty hidden in Dreamweaver MX...

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

iframes are fine, but don't work in N4.x and lower and IE3 and lower.

Object I'm not sure about, it's usually used for plugins? Though I think it's making a comeback for images for XHTML 2.

Use CSS, or use JavaScript and CSS, or reconsider your design choices. They may not be best for the user.

He has: 18 posts

Joined: Sep 2003

Is it practicly _anyone_ who uses browsers _not_ compatible with iframes?

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

Quote: Originally posted by Suzanne
Object I'm not sure about, it's usually used for plugins? Though I think it's making a comeback for images for XHTML 2.

I haven't read much on it, but I think they're going to replace even ... not sure, though. But definitely a comeback.

Quote: Originally posted by Enselic
Is it practicly _anyone_ who uses browsers _not_ compatible with iframes?

I know a couple of lynx users. Frames of any kind aren't the most usable -- I personally avoid and dislike them for this reason. But, practically, you're right. The wider audience does support frames to some degree. Smiling

He has: 18 posts

Joined: Sep 2003

Ok.

Thanks for your comments, they help.
I know how irritating noobish people can be Smiling.

I'll use iframes for now...

He has: 1,380 posts

Joined: Feb 2002

you can use a div layer, just make it static-ly positioned.

http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=div+layer

They have: 15 posts

Joined: Jun 2003

I write my navbars/menus with javascript and put it in an external sheet and just include it in all my pages. One place to make changes to any number of pages.

They have: 461 posts

Joined: Jul 2003

Quote: Originally posted by Enselic
IFRAMES or OBJECT, are they not even considerable?

They seem pretty hidden in Dreamweaver MX...

don't use dreamweaver. it adds a shitload of crap to your code.

http://www.xemacs.org
http://www.gnu.org (search for emacs)

if you use winblows, don't worry, they have ports fot it. both of those are FAR superior and FREE.

no added code.

only issue: you better know the language because it wont write any of it for you

POSIX. because a stable os that doesn't have memory leaks and isn't buggy is always good.

He has: 18 posts

Joined: Sep 2003

I don't think Dreamweaver adds shitloads of code... If you are refering to the code that you can see.

And I don't know HTML or Javascript so without DW i'm pretty sold...

He has: 296 posts

Joined: May 2002

Dreamweaver makes the code bulky and adds un-needed code. Sometimes it adds invalid code, too. Like the tags, should be used instead.

I recommend learning HTML. Every webmaster should have AT LEAST basic HTML knowledge.

[James Logsdon]

He has: 18 posts

Joined: Sep 2003

I surly have FAR above basic HTML knowledge. I lack on the Javascript though...

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

Have you considered implementing the script Renegade linked? Frames are far more hassle than they are worth (user and coder).

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.