467,879 Members | 1,090 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,879 developers. It's quick & easy.

Keeping css menu in all pages

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
  • viewed: 2572
Share:
6 Replies
harshmaul
Expert 256MB
check out server side includes...
http://en.wikipedia.org/wiki/Server_Side_Includes
Mar 6 '08 #2
Stang02GT
Expert 1GB
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
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 1GB
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
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
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.

Similar topics

1 post views Thread by Bizt | last post: by
6 posts views Thread by JIM.H. | last post: by
6 posts views Thread by Sandy | last post: by
3 posts views Thread by Tumurbaatar S. | last post: by
4 posts views Thread by Bart | last post: by
9 posts views Thread by hurricane51 | last post: by
reply views Thread by MrMoon | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.