Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

HTML & CSS Sidebar menus

RobertWA

Active Coder
I want to use a sidebar menu (width about 20%) which remains on the page when an item is clicked and the content opens in the remaining 80%. Ie when the content is visible, so too is the menu.

How can I use a hyperlink in a menu item to open a file in the other part of the screen, still leaving the menu visible?

Thanks in advance

Robert
 
One solution may be to use frames: https://www.tutorialspoint.com/html/html_frames.htm

Frames are no longer really used, however, but if you are looking to embed a PDF that shows up when you click a link in a navigation menu and have the menu still visible, it might be a viable solution. You should never use frames for HTML content though, those days are long gone.

Another option might be to have an iframe for the embedded files and when you click the link Javascript updates the src value of the iframe with the URL of the new file the user is viewing. This might be a better option than using frames.
 
One solution may be to use frames: https://www.tutorialspoint.com/html/html_frames.htm

Frames are no longer really used, however, but if you are looking to embed a PDF that shows up when you click a link in a navigation menu and have the menu still visible, it might be a viable solution. You should never use frames for HTML content though, those days are long gone.

Another option might be to have an iframe for the embedded files and when you click the link Javascript updates the src value of the iframe with the URL of the new file the user is viewing. This might be a better option than using frames.
Thank you. I'll look into that. I'm using html files, not PDF.
 
Back
Top Bottom