Forum Moderators: not2easy

Message Too Old, No Replies

Menu help please!

Looking for help on creating a static menu in css with code.

         

brug0049

7:33 pm on Jul 16, 2007 (gmt 0)

10+ Year Member



I have my site nicely laid out. I am interested in keeping a simple horizontal and right sub menu static so that only the center content box needs to load when a link is clicked, not the entire page.

Do I have to make this with frames? Or is there an easy way to make this with CSS/HTML?

Here is an example site: [xs4all.nl...]

DrDoc

7:44 pm on Jul 16, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld! [WebmasterWorld.com]

You are correct. What you describe -- having static menu and only have the content portion reload when a link is clicked -- can only be handled using frames.

Xapti

12:27 am on Jul 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A way I reccomend to do this is to have your content as the main page, and use an IFRAME for your nav menu. That way you won't have to deal with messy framesets, AND your page's address in the browser's address bar and forward/backward links will work the way they are supposed to.

The one problem is that it doesn't actually do what you said (not reload certain content), so it really might not be a good option.
It will still re-load the nav menu (or whatever it is you are including) every time. Thing is, it would be cached anyway, so it should be pretty quick. The part where it becomes an issue is if you had some sort of time-sensitive object running, such as background you didn't want to restart every time you change pages, or had a javascript timer for something, etc.

But like I mentioned, using framesets (or an iframe as your main content) can be really really bad. Search engines can't deal with them as well, users can't navigate through them easily, And stuff like bookmarks or link transferring can be difficult.

Marshall

1:25 am on Jul 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Depending on the extent of your content, you could use multiple hidden <div> with a simple toggle to show/hide. Basically, you have a main <div> that appears onload and then when visitors click a link, it toggles the <div>. Of course, it's a combination of CS and javascript.

Marshall

brug0049

4:11 pm on Jul 18, 2007 (gmt 0)

10+ Year Member



Thanks for all the help! (I just posted a new thread because I wasn't able to veiw this one until now)

Is there tutorials on frames and IFRAMES? (I never heard of that before) I have always heard that frames are bad, but I've seen thousands of sites with the static menu in them.

I don't think the CSS DIV hiding will work since I will have about 5 main links and 25ish submenu links (i am creating a portfolio site).

Thanks again for the help, it's pointing me in the right direction