DH Templates

How to integrate the links and menu in CSS?

I am working on a personal website and I have downloaded a free CSS template. I am somewhat familiar with CSS (its been a few years) but need help integrating the side menu bar and top menu bar in the style sheet so I don't have to change them manually on every page. Any help is greatly appreciated! Thanks for the ideas so far. I do not believe that I CAN do this with CSS... so then here's another question: How do websites, like CNN.com for example, have the SAME links on every page WITHOUT having to manually change the links on EVERY page? What type of script will do this? I am using adobe dreamweaver and I also have microsoft frontpage. Is this something I can do with these programs? I usually write my own html/css from scratch, so i'm not very versed with these programs. Thanks!!!

Public Comments

  1. I'm not sure it's possible to do this just using CSS - someone else may prove me wrong - because CSS is for styling not content. What I did was to use an iframe and a lot of CSS to produce my menu. The menu is actually just a plain HTML page controlled through CSS and JavaScript and a link to it placed on every page - the effect is that I just have to update the one menu page. For details see http://brisray.com/utils/umenu.htm I'm now thinking of changing it again so the menu is written just using CSS and JavaScript.
  2. Did you mean use the same style for side menu bar and top menu bar in every web pages? Add the <link> tag to every pages: <link rel="stylesheet" type="text/css" href="path/yourtemplate.css"> Define an id for your menu bars, e.g. <div id="top_nav">The top menu bar</div> <div id="side_nav">The side menu bar</div> You will only need to add some id selector in the css file like this: #topnav { background-color: #00FF00; } #sidenav { background-color: #FF0000; } Modify only the css file will change all the pages. So, you don't need to modify all the pages one-by-one.
  3. Hi, If you make the menu files as external files & want to include them on every page so any change in the menu file occur on all pages, you don't need CSS for that all you need is SERVER SIDE INCLUDES. If you are using a server side language, lets say PHP or ASP, you can do so by following steps... 1- Put the whole menu code in a new file & save that. Then back on the main page, use the below code to include the external file... IF YOU ARE USING PHP <?php include("external_file_name.php"); ?>? IF YOU ARE USING ASP <!--#include file ="somefilename"--> Regards, Muhammad Uzair Usman Creative Web2.0 Website Designer http://www.uzairusman.com
Powered by Yahoo! Answers