By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,492 Members | 1,987 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,492 IT Pros & Developers. It's quick & easy.

Keeping css menu in all pages

P: 4
Hi, I am using Dreamweaver CS3. I'm trying to apply the CSS SpryMenu to all pages on my site (www.ezitin.org).

I want that menu to be the displayed in every page so I don't have to edit each page with the links. I have seen where people say put "<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />" in each page...but that doesn't seem to work..

Does it matter if my page extensions are in php, html?

Thanks!
Mar 6 '08 #1
Share this Question
Share on Google+
6 Replies


harshmaul
Expert 100+
P: 490
check out server side includes...
http://en.wikipedia.org/wiki/Server_Side_Includes
Mar 6 '08 #2

Stang02GT
Expert 100+
P: 1,208
Hi, I am using Dreamweaver CS3. I'm trying to apply the CSS SpryMenu to all pages on my site (www.ezitin.org).

I want that menu to be the displayed in every page so I don't have to edit each page with the links. I have seen where people say put "<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />" in each page...but that doesn't seem to work..

Does it matter if my page extensions are in php, html?

Thanks!
If your menu is its own separate file you could add an include statement in your code to place your menu where you want it. You would have to put the include statement on each page you want the menu to show up.


something like

Expand|Select|Wrap|Line Numbers
  1. <!-- #include file="menu2.htm" -->
Mar 6 '08 #3

P: 4
Thanks for the replies. I went ahead and enabled ssi and started my test run. It seems everything worked: (test index.shtml), though I am having a heck of a time getting the menu to center.


index.shtml code:
<body>
<div align="center"><a href="http://ezitin.org">
<!--#include file="ssi-banner.html" --></a>
<!--#include file="ssi-menu.html" -->
</div>
</body>


My ssi-menu.html code is only the code necessary to create the menu. I have tried putting in seperate Div's, also forcing the menu to be in a centered table. Neither seem to work.
Mar 6 '08 #4

Stang02GT
Expert 100+
P: 1,208
Thanks for the replies. I went ahead and enabled ssi and started my test run. It seems everything worked: (test index.shtml), though I am having a heck of a time getting the menu to center.


index.shtml code:
<body>
<div align="center"><a href="http://ezitin.org">
<!--#include file="ssi-banner.html" --></a>
<!--#include file="ssi-menu.html" -->
</div>
</body>


My ssi-menu.html code is only the code necessary to create the menu. I have tried putting in seperate Div's, also forcing the menu to be in a centered table. Neither seem to work.

I know a lot of people don't encourage doing this but you could put it in a table.

Expand|Select|Wrap|Line Numbers
  1. <table width="840" cellpadding="10" cellspacing="0" border="0">
  2. <tr>
  3.     <!-- #include file="menu2.htm" -->
  4. </tr>
Mar 6 '08 #5

P: 4
I know a lot of people don't encourage doing this but you could put it in a table.

Expand|Select|Wrap|Line Numbers
  1. <table width="840" cellpadding="10" cellspacing="0" border="0">
  2. <tr>
  3.     <!-- #include file="menu2.htm" -->
  4. </tr>
Not sure what happened, but the menu is centered in my root directory...but not in the /test/index.shtml. I went over the code, it's all the same. Whatever works, I guess?

Thanks for the replies! This boards full of information.
Mar 6 '08 #6

P: 12
Since he mentioned PHP extensions on his source code, I'm assuming that he has a server that's running PHP. The includes look like this--

Expand|Select|Wrap|Line Numbers
  1. <?php include("mymenustuff.php"); ?>
Server side includes can really modularize things nicely.

If you want to stick to the CSS standard, don't put the menu in a table. Instead, define a class that has the appropriate margins and spacing. Tables are for tabular data.
Mar 9 '08 #7

Post your reply

Sign in to post your reply or Sign up for a free account.