Ask Dave Taylor: Tech and Business

Tuesday

Building CSS and JavaScript Menus

I love CSS. I would like to use CSS menus. I have seen several versions on the netover the last 12months (I currently use a javascript menu system). My biggest problem with these CSS menus is that you have to put the menu code into each HTML page as far as I can see). This means a menu change for a site must be updated in every page.

This seems to go against the idea that CSS can be used to change the look and feel of an entire web site by just chnaging the external style sheet. Do you know of a way of putting CSS menus information in an external file that can be linked or imported into the HTML?


Sure, this is actually pretty darn easy! Just look at the <link> tag.

Or work by example: use View Source in your Web browser to view the HTML source to...