1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

CSS Newbie: Layout and menu

Discussion in 'CSS' started by celicaGT, Nov 29, 2005.

  1. #1
    Basically I am new to CSS layout. I have created my css layout. I have a banner, content sidebar and footer. However I was wondering if I can put the content I wish i want in the sidebar in an external file or something. The reason for this is it is my menu and I need to edit it often and don't want to be changing it on 100+ seperate files. I was using a framed site and obviously this problem did not exist then as the menu file could be easily changed etc. Please help!!
     
    celicaGT, Nov 29, 2005 IP
  2. dave487

    dave487 Peon

    Messages:
    701
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you are able to use php on your server you can create a file called menu.inc.php and then write
    include(menu.inc.php); on each page.
     
    dave487, Nov 30, 2005 IP
  3. FeelLikeANut

    FeelLikeANut Peon

    Messages:
    330
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #3
    FeelLikeANut, Nov 30, 2005 IP
  4. Shodan5

    Shodan5 Guest

    Messages:
    53
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Yeah, use the php include. That is always best.
     
    Shodan5, Dec 5, 2005 IP
  5. someguy

    someguy Guest

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I agree the best way is to use a server side include, otherwise you would have to use an iframe, then links to other pages can get messy.

    If you are intrested in using an iframe it basically works by another page being displayed in a small window, they are often used for displaying news and stuff. I would only use this as a last resort if you can go down the Server Side Includes route.
     
    someguy, Dec 8, 2005 IP
  6. mani_

    mani_ Banned

    Messages:
    46
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    you can use an external javascript file.. Include it in your menu Div or wherever you want to put as
    and create a javascript external file (your-file.js) placed with the same file containing
    Hope this might work if you have an index.html page.. If you have a php page then there is no need of javascript you can include a php file also.
     
    mani_, Dec 9, 2005 IP
  7. Interlogic

    Interlogic Peon

    Messages:
    451
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #7
    <!--#include virtual="/menu.shtml" --> will work in a static .shtml file, ASP, PHP etc. on windows and *nix..

    (If you aren't doing any coding then I recommend just renaming your .htm files as .shtml and use the include virtual code anywhere you want to use the same piece of html over and over)
     
    Interlogic, Dec 9, 2005 IP