September 17th, 2013, 05:07 PM
CSS for chosen item in menu
I currently reload my website for every menu item selected with php. ie if the user clicks page2 I reload a page top, nav sidebar, page footer and then using php include I load in the content for page2. Of course in practice the page top, nav sidebar and page footer are recalled from cache so they do not blink and the user is only aware of the content part of the page changing the way it should be.
Having just begun to get to grips with CSS for positioning I am in the process of converting my site from a 1990's table layout to CSS layout. I wonder if there is a way to call in page content with CSS as opposed to php include statements.
Any help greatly appreciated.
September 18th, 2013, 06:33 AM
Are you familiar with Ajax?
I don't see a problem with using includes to load in page content?
Keep your HTML in separate files in a directory somewhere and depending on the link clicked ($_GET var passed), load in the relevant content.
I think what you have described that Ajax would be your best option?
You can't do it with CSS I'm sure.
September 18th, 2013, 09:56 PM
Garry where are you saying the files included via PHP are cached?
Anyway, as Nanomech said, CSS can't do that since that is well beyond the scope of the purpose of CSS.