Log in

View Full Version : Question about chrome menu CSS.



shades99
08-13-2007, 01:34 PM
Hi, I am new to CSS.

I downloaded the chrome css menu from this site and it works great.

I have a problem though:

Lets say I use this menu for my site which has 60 pages. As soon as I would like to add/edit/remove a link in the CSS menu, I currently have to change in every page since the actual links for the menu are in the HTML code?

Is there a way or method to seperate and put the divtag links as an external file, or in the CSS file somehow???


Sorry, if this is a stupid question. As I said I am new to CSS. My last menu, was a java menu that I used as a frame, and I only had to change that page and the menu changed for the entire site......

TIA..

alexjewell
08-13-2007, 01:42 PM
PHP. You'd make all the files .php files, and make a seperate php file and include it in every page, like so:

inc.php:


<div id="menu">...</div>
<!-- put your menu's code above -->


page.php:


<?php include('inc.php'); ?>
<!-- include that in every page -->


So, when you edit inc.php, you edit what's included on every page. Make sure you change your files to a .php extension, though. [And that your server supports PHP]

ddadmin
08-13-2007, 08:32 PM
Warning: Please include a link to the DD script in question in your post. See this thread (http://www.dynamicdrive.com/forums/showthread.php?t=6) for the proper posting format when asking a question.

designergav
10-04-2007, 09:59 AM
If you are using dreamweaver you can create the menu as a library item (a self contained bit of code) and include this on each page much like php but without having to change the language of your entire site and thereby avoiding all the url redirects etc required.:) :)

molendijk
10-21-2007, 06:32 PM
You can have html include like it's done here (http://www.dynamicdrive.com/forums/showthread.php?t=25009&highlight=molendijk).

Arie Molendijk.