Results 1 to 3 of 3

Thread: Menu in an external file

  1. #1
    Join Date
    Sep 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Menu in an external file

    Hello all,

    I'm still very new to CSS, just trying to work it out....

    I want to put a drop down menue on my site and found on DD this one:

    Chrome CSS Drop Down Menu (v2.01)
    http://www.dynamicdrive.com/dynamici...rome/index.htm

    I've put it on one page, I've changed it in my editor and it works all very well. The menue itself refers to an external css-file - everything works fine.

    BUT:
    Since I'd like to use it as a navigation bar, I'd like to put the whole menue in an external file to which all the pages on my site will refer to, so when changing i.e. a submenue it will appear on all pages.

    How has this file to look like?
    What will I put in the <head>-section on my pages?

    Hope you understand what I'm trying to ask......

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    You could have an external .js file that generates the content, but that isn't how that particular script is setup.

    I'd use PHP, myself.

    <?php include('mymenu.txt'); ?>

    that will print the contents of mymenu.txt into the existing html of the page.

    Note that you need php installed/enabled on your server and your page must end in a .php extension.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Sep 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by djr33 View Post
    You could have an external .js file that generates the content, but that isn't how that particular script is setup.

    I'd use PHP, myself.

    <?php include('mymenu.txt'); ?>

    that will print the contents of mymenu.txt into the existing html of the page.

    Note that you need php installed/enabled on your server and your page must end in a .php extension.
    Thanks, I see, I'd have to get into php as well.....Hoped to skip that, because I've just mastered HTML and a bit of CSS and my server doesn't support PHP.

    So I have to put the menue description on every page until I start with php.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •