student3 Posted July 28, 2012 Share Posted July 28, 2012 I'm currently learning XHTML, what's the easiest way to get a navigation bar to remain on the index page after clicking one of its links? I'm thinking frames but is there an alternative way to achieve a menu that doesn't open its links in the same window (because this means that the menu disappears) In HTML I would use the following (if I wanted the links to open in a iframe): <iframe src="page1.html" id="frame1"></iframe> <p><a href="http://www.w3schools.com" target="frame1">W3Schools.com</a></p> But how can I modify this code so that it works and validates in XHTML? "target" is invalid in XHTML. What can I use instead? Link to comment Share on other sites More sharing options...
Ingolme Posted July 29, 2012 Share Posted July 29, 2012 If you have the same menu and design on all the pages then the problem is solved. Loading time for the page is minimized by having all the styles in an external stylesheet which is cached. Link to comment Share on other sites More sharing options...
student3 Posted July 29, 2012 Author Share Posted July 29, 2012 If you have the same menu and design on all the pages then the problem is solved. Loading time for the page is minimized by having all the styles in an external stylesheet which is cached. You mean literally copy and paste the sidebar (menu etc) and header onto each content page? Link to comment Share on other sites More sharing options...
Ingolme Posted July 30, 2012 Share Posted July 30, 2012 We usually use a server-side language to show the same page but with different content. PHP is the most popular server-side language at the moment, so you will get a lot of support if you use it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now