Results 1 to 2 of 2

Thread: single css menu on multiple pages

  1. #1
    Join Date
    Apr 2012

    Cool single css menu on multiple pages

    i have just introduced myself to php, i am currently developing a website using frames, i have a css menu that has to appear on multiple pages,i have read there is a way of using php to connect the pages but it does not work, i really need help on this one.

  2. #2
    Join Date
    Jul 2009
    My house, sitting at the computer. Duh!
    Usually the way you'd accomplish this would be to put your menu in a separate file and function, and include that file where you need it. For example:

    PHP Code:
    function menu()
                <li><a href="#">Link</a></li>
                <li><a href="#">Link</a></li>
                <li><a href="#">Link</a></li>
    PHP Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
            <title>Some Page</title>


            <div id="body_content">
                <p>something else goes here</p>
    This is an effective way to split up your website into multiple pieces, which is very useful when you want to add a button to your menu for instance. Then you only have to change it in one place, and it's updated on every page of your website.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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