Jump to content

How to use CSS to build Navigation menu & insert on all Web Pages


Recommended Posts

Posted

I am partially new to Web Site but have got as far as using CSS to lay out a page.

 

Here is my site: ***

 

My immediate problem is:

 

1. That Navigation bar on the left has several menu items in it. I am at a stage now where I need to change it, and that change I would like to appear on all the pages - automatically. However, I do not want to have to go to each of the 30 pages, edit them, to include the NEW menu item.

 

QUESTION. How do I use CSS or Javascript to build ONE Navigation menu file, place that file in my central folder, then put a link on all my Web pages to call that Navigation Menu bar?

 

Thank you.

Posted

Hi,

 

Welcome to the forum.

 

You have two options:

 

1. Change your pages to PHP pages and use PHP includes. Check out my video on PHP includes. The problem with this approach, that you will need to change the pages from being .html pages to .php pages.

 

2. You can use perhaps something based on Ajax or even more simply, use an iframe to contain your menu.

 

Which solution to choose?

 

If I didn't have much direct traffic coming to the sub-pages of the site, I would just go ahead with PHP includes - they are overall the best option. Otherwise, I would look to using an iframe.

 

Stefan

Posted

Thank you for the quick answer. I was hoping that it would not be necessary to learn a new method at this time. However, recently, I started trying to use .php to build a web site using osCommerce, so I may continue along this path.

 

I will take a look at those sites referred to, try them and get back to the forum.

 

Angelfl

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...