Page 1 of 1
CSS question/assistance
Posted: Thu May 14, 2009 1:37 pm
by unfaithfulsfan
Is there a way to create a menu in your css file that appears on your pages so you don't have to update every.single.page. when you add a page that needs to be in the site's navigation? I thought somewhere in my perusings over the years that I saw that there was but I just can't remember if or how...
Thanks
Jack
Re: CSS question/assistance
Posted: Thu May 14, 2009 2:32 pm
by Darkstar
i dont have the knowledge of css to answer, but have directed a couple to this site which they found to be very helpful;
http://www.w3schools.com/Css/default.asp

Re: CSS question/assistance
Posted: Fri May 15, 2009 4:06 am
by DMB2000uk
You're going to have to still update every page even if you use a CSS menu system.
CSS is only meant to be used for styling things, not content as the menu is.
You could look into using templates if you are coding in something like dreamweaver.
Dan
Re: CSS question/assistance
Posted: Fri May 15, 2009 8:56 am
by hnzw_rui
Why not javascript? You only need one javascript to dynamically insert a menu. True, you still have to insert <script type='text/javascript' src='menucreate.js'></script> on every html but at least that's probably shorter than inserting the code for the whole menu. Plus, you only need to edit menucreate.js to update every page. Caveat, might not work with browsers that have javascript turned off.
Question though, are you limited to plain html files? Because if you can do server-side scripting with php, asp, etc, this is pretty easy to do. I have a mirror of the PHP.net on my laptop and when I checked the scripts, I noticed it dynamically inserts the header and footer to every page. Pretty neat, huh?
Re: CSS question/assistance
Posted: Fri May 15, 2009 12:29 pm
by Tech_Greek
Do a PHP Include and link it to another page, I did this and you could never tell...all of my websites are like this.
Re: CSS question/assistance
Posted: Fri May 15, 2009 2:11 pm
by FZ1
ASP, Javascript & PHP will all work if you code it as includes. Basically, it references code from a single source. If you are doing a site with many pages, this is the best way to do it for not just menus but any other content that will appear more than once on various pages.