Keeping css menu in all pages

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Hunterx82
    New Member
    • Mar 2008
    • 4

    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="SpryAsset s/SpryMenuBarHori zontal.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!
  • harshmaul
    Recognized Expert Contributor
    • Jul 2007
    • 490

    #2
    check out server side includes...

    Comment

    • Stang02GT
      Recognized Expert Top Contributor
      • Jun 2007
      • 1206

      #3
      Originally posted by Hunterx82
      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="SpryAsset s/SpryMenuBarHori zontal.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

      Code:
      <!-- #include file="menu2.htm" -->

      Comment

      • Hunterx82
        New Member
        • Mar 2008
        • 4

        #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.

        Comment

        • Stang02GT
          Recognized Expert Top Contributor
          • Jun 2007
          • 1206

          #5
          Originally posted by Hunterx82
          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.

          Code:
          <table width="840" cellpadding="10" cellspacing="0" border="0">
          <tr>
          	<!-- #include file="menu2.htm" -->
          </tr>

          Comment

          • Hunterx82
            New Member
            • Mar 2008
            • 4

            #6
            Originally posted by Stang02GT
            I know a lot of people don't encourage doing this but you could put it in a table.

            Code:
            <table width="840" cellpadding="10" cellspacing="0" border="0">
            <tr>
            	<!-- #include file="menu2.htm" -->
            </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.

            Comment

            • eBay
              New Member
              • Mar 2008
              • 12

              #7
              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--

              Code:
              <?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.

              Comment

              Working...