- This topic is empty.
Viewing 11 posts - 1 through 11 (of 11 total)
Viewing 11 posts - 1 through 11 (of 11 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hello
I’m read manual about CSS. There are some CSS menu examples.
But i have question about HTML. This is test html page (like main page)
So if i want keep menu on firstpage.html, secondpage.html, thirdpage.html pages i need repeat this code there ? I must do it on all HTML pages ?
Thanks
You can use php so you only have to change it once.
Create a file like ‘navigation.php’ – then instead of the HTML on each page you can put:
What does Ajax have to do with this?
Didn’t you know Doc? Ajax is amazing, it’s the solution for all your web problems!
Solve everything with Ajax!
Dont know about Ajax but usually I use php include, I thinks the best way to insert a menu.
I can’t tell if that iframe comment is a joke or not. So just to make sure the OP doesn’t get confused, do not use an iframe for this.
Browser compatibility for one. It seems so simple but there are some definite quirks for some browsers. I’ve read a few instances of IE9 going a little bonkers.
In this case, the OP isn’t trying to create some application where an iframe would (naughtily) be required. Using a PHP include would make it be a ‘single page’, not two pages that the browser has to render independently.
It’s funny, I don’t really have an argument outside of simply knowing that it’s wrong.
Haha I was going to add I was taught never to do it, but then I couldn’t recall what any reasons were… hmm…
@cnwtx, php would be better from the vantage point of site performance. An iframe requires that the page requests the external iframe (nav, template part, etc.) be loaded as an additional resource to the page, at the browser level. A php include is processed on the server and the file is served as a singular entity to the client, no additional request needed by the browser. Does that make sense?