Help!

Question re External Style Sheet


Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Web Developers RSS
Next:  Tivo help  
Author Message
DanV



Joined: Feb 03, 2006
Posts: 7



PostPosted: Tue Jan 30, 2007 10:29 pm    Post subject: Question re External Style Sheet

Hi Everyone

Haven't posted anything since last year so let me wish a happy new year to all.

My question has to do with external style sheets (or it may be an external javascript - not sure).

On each page of the website I have some menus and some of their elements I have been able to use a style sheet for. But on each page I have to put the following as instructed by the menu designers:

<div id="menu" class="menu">
<a href="http://website.com/contents.html" class="menuitem">Contents</a>
<div class="seperator"></div>
<a href="http://website.com/article1.html" class="menuitem">Article 1</a>
<a href="http://website.com/article2.html" class="menuitem">Article2</a>

As you can see, every time that a new article appears, 3,4 5, etc., I have to go to each of the pages and add it on. So, basically I'm wondering if there is a way to make a .css or .js external so all I have to do is change that one sheet.

For example, I have used some of the menus and tips from 'Dynamic Drive' which has a lot of useful ideas. They show how to make an external sheet for one part of the menu but then they instruct you to put the other part in the 'body' of the page. If I could make an external for that part too it would make changes to the menu a one-sheet activity and of course, easier.

I hope I have described this correctly.

Thank You

DanV
Back to top
davesnes



Joined: Sep 04, 2005
Posts: 6



PostPosted: Tue Mar 06, 2007 6:20 am    Post subject: Question re External Style Sheet

You should copy this code only in a new document and save as "menu.inc"
Put it in same directory as your pages,
Now in each page which require the code write
<?php include("menu.inc"); ?> where it is needed. I am certain your host runs php.

good luck.
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Web Developers All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum