PDA

View Full Version : What should I use for my dropdown menu?



Partizan
Jan 6th, 2009, 03:49 PM
Hi all,

I am creating a new website and I want to have a drop down menu, something along the line of this I found on the web:

http://tutorials.alsacreations.com/d...horizontal.htm

Thing is, I would like to be able to change the font style and actual text of the menu over time and what would be practical is that all this could be done via one file thus negating the need to update the menu code on possibly 100s of site pages in the future.

I am not sure if this is possible and simple to do. I have read I can change fonts using cascading style sheets yet I can not find anywhere whether I can also change text.

If anyone can help me I would be greatly appreciated and even more so if anyone has come across resources or code used by others which I can modify.

Thanks.

Apostropartheid
Jan 6th, 2009, 04:06 PM
You are looking for server-side includes (SSIs). They can be done in multiple languages; Google it and see what's good for you.

Rowsdower!
Jan 6th, 2009, 04:06 PM
Hello and welcome to the forums. I'll start off by saying that your link is broken so we can't really see what you're after as far as menu style goes.


Thing is, I would like to be able to change the font style and actual text of the menu over time and what would be practical is that all this could be done via one file thus negating the need to update the menu code on possibly 100s of site pages in the future.

I am not sure if this is possible and simple to do. I have read I can change fonts using cascading style sheets yet I can not find anywhere whether I can also change text...
CSS will indeed allow you to change the appearance/presentation of your menu and any other element in your webpages. It will not update the actual content of the page, however. To clarify, you must update the actual HTML manually to change content and update the CSS manually to change appearance of content.

You could theoretically use an external java file that writes your menu for you. That way you'd just have to link to the js file and then call the function to write your menu as the page loads. This has SERIOUS drawbacks though, as anyone with java disabled will see absolutely nothing for navigation.

The only solid and widely accessible way I can think of to change the menu only once would be server-side through scripting. If you're asking about just basic development on your own at home and you don't want to learn PHP/MySQL/etc. then you'll be stuck hand-manipulating the content of all of your menus manually on each page (or at least as far as I know).

Apostropartheid
Jan 6th, 2009, 04:11 PM
The only solid and widely accessible way I can think of to change the menu only once would be server-side through scripting. If you're asking about just basic development on your own at home and you don't want to learn PHP/MySQL/etc. then you'll be stuck hand-manipulating the content of all of your menus manually on each page (or at least as far as I know).
He could use simple SSIs--the sort which only work if the page's extension is .shtml or it is sent with the appropriate MIME header. They're simple and are formatted in HTML comments, so if something goes wrong nothing drastic will show up in the include's place.

Partizan
Jan 7th, 2009, 12:53 PM
Thank you for the replies guys.

I have tried the SSI idea and so far it seems to be the perfect solution :thumbsup:

Cheers!