View Full Version : css navigation
mickeymickeyg
07-14-2008, 04:23 PM
hi - I would like to create a list of 17 links on a vertical navigational menu, what should I do to ensure that if I change, delete a link on the menu that it changes throughout the rest of the site also? Instead of having to go through each page individually. hope you can help!
Thanks
Michael
boogyman
07-14-2008, 05:37 PM
css is a tool to style the links, or make them "look" different.
If you wish to only need to update one section of the navigation and have it change across the entire site then you either need to create a database/table relationship or you need to use some sort of other template system where you "pull in" all of the links into each page... to do this you would need some sort of server-side programming language like php.
There is a way to accomplish this without using a server-side code, by using javascript, however javascript can be turned off, and thus those users will not be able to effectively navigate properly through your site.
molendijk
07-14-2008, 06:55 PM
This (http://dynamicdrive.com/forums/showthread.php?t=34271) (the 'URL TO CODE') might be useful. There's a download.
Put your menu in 'menu.html', then insert into every page: <a href="menu.html" rel="include" >MENU</a>. Users who have javascript disabled will see a link towards the menu (with text: MENU). Users who have javascript enabled (the vast majority) will see the menu itself.
---
Arie Molendijk.
molendijk
07-14-2008, 07:23 PM
OR... if your menu is just a list of links (no unfolding menu items), you could do this:
1. Put the list of links in a file called 'menu.html'.
2. On every page except 'menu.html', put something like the following in the body section:
<iframe src="menu.html" style="position:absolute; top:20%; left:10px;width:150px;height:60%;overflow:auto"></iframe>
Css for the body (just an example):body {padding-left: 160px}
---
Arie.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.