Iframes as a sidebar in html?

  • Thread starter Thread starter blackbird453
  • Start date Start date
B

blackbird453

Guest
I'm trying to use the <iframe> tag to create a sidebar in html, the sidebar is going to be often modified and needs to be displayed on many pages.The problem is, when a link in the sidebar is clicked, only the iframe page changes, not the entire page. How can I make it so links in the sidebar affect the entire page instead of only its iframe?

If there's a solution with this in CSS, please state it.
 
Using an iframe to create a sidebar is probably not good practice. However, if you must, you can probably use the target attribute, either in the links or in a base tag.

<base target="_top" />

Put that in the <head> and your problem will (probably) be solved.
 
iFrames aren't the best way of doing this...

Either use ssi (server side include) in html if ur page is static <!-- #include file="x.htm" -->
or a server side script like a php or asp include.

You could try target="_parent" or "top" or the name of the main frame but its a hack at best!
 
Back
Top