View Full Version : how to insert an element by reference?

05-17-2012, 04:24 PM
I am new to css and have been doing some Notepad coding. My test site is http://www.trepaning.com What I am curious about is, the side menu on the page, is there a way to create that a single time in another file (html page or css or something else perhaps) and simply insert the side menu on pages by reference? This would allow menu changes across the site just by changing info in one file, so I am just wondering if that is possible, as I am looking to learn tricks to reduce the amount of code on an actual page. Thank you for any info.

05-17-2012, 04:42 PM
Look into server side includes (http://en.wikipedia.org/wiki/Server_Side_Includes) or the include() (http://php.net/manual/en/function.include.php) function of PHP. Your server/host has to support this, though.

05-17-2012, 05:07 PM
thank you very much for the info, it is appreciated.