Results 1 to 6 of 6

Thread: CSS Nav bar

  1. #1
    Join Date
    Dec 2008
    Posts
    20
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default CSS Nav bar

    Hey

    i currentley use a css and java based nav bar, but keep getting fed up when i change something on it that i then have to go and change it on all 50+ pages

    is there any way i can get the code to look for 1 single nav bar? that way i can just change it once

    thanks


  2. #2
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Put the css and java in separate files and reference them.

  3. #3
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    try the link in my post in this thread: http://www.dynamicdrive.com/forums/s...ad.php?t=47165 (4th post down)

  4. #4
    Join Date
    Sep 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Put something like this in your HEAD section.

    (This assumes your css file is named styles and that its in the same folder as your html file, amend as required.)

    EG

    <link href="styles.css" rel="stylesheet" type="text/css"
    media="screen" />

    any changes you do in your css file will affect all pages with reference to your css file.

    Hope this helps
    Qikfire

  5. #5
    Join Date
    Jul 2009
    Location
    Coquitlam BC Canada
    Posts
    46
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Default

    use php. make a file called menu.php and put the menu in there. then put
    Code:
    <?php include("menu.php");?>
    at where you want to make the menu appear.
    assuming that the menu.php is in the same directory as the page. If not, change it.

  6. #6
    Join Date
    Sep 2009
    Location
    Burbank, CA
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    You can use a find and replace editor, I use Dreamweaver when I am working on a huge site, I usually code in PHP and use includes like what was suggested earlier, "<?php include("menu.php");?>" it is the best way, but if you have Dreamweaver use the find and replace feature,....

    BEST~
    RS

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
  •