The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> Fixed menu
RobertWA
post May 6 2021, 10:33 AM
Post #1





Group: Members
Posts: 8
Joined: 6-May 21
Member No.: 27,926



I am fairly new to HTML but I think I understand the basics. But I have a problem.

I want a page which has a fixed side menu (left side, about 20% wide) containing hyperlinks to html files, which will open when selected in the right-hand 80% of the screen. I want the menu to remain on the screen while the user scrolls through the file content.

I have tried using iframes and that works except for one annoying feature. When the content opens in the right-hand iframe it has its own vertical scrollbar, and the overall page also has a vertical scrollbar. (The menu on the left has only a few items so it will not need to scroll.) In order to see the full content of my file I have to use both scrollbars.

What I would like to be able to do is to have the clicked file open in the right-hand part of the screen but without its own scrollbar. In this way I would just need to use the main page scrollbar to scroll down through my entire document.

I have seen several examples of sidebar menus but none of them has used links from one side to the other – they generally just include predefined content to demonstrate the structure and the scrolling behaviour. If I try to adapt these to include hyperlinks (ie without using iframes) I find that the selected file opens in the whole screen, blocking the menu, rather than only in the 80% so that the menu remains visible.

Any help would be appreciated.

Robert
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
 
Reply to this topicStart new topic
Replies
pandy
post May 6 2021, 11:06 AM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



What about putting the menu, not the content in an iframe and disable the iframe scrollbars?

I'd advice you not to use any kind of frames though. It's much better to include the menu on each page. Either you do it serverside or just copy the menu markup into each HTML page. Iframes are basically only used for ads today, were seldom for content.

https://htmlhelp.com/faq/html/frames.html#frame-problems
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
RobertWA
post May 6 2021, 11:26 AM
Post #3





Group: Members
Posts: 8
Joined: 6-May 21
Member No.: 27,926



Thank you for the reply.

QUOTE(pandy @ May 7 2021, 12:06 AM) *

What about putting the menu, not the content in an iframe and disable the iframe scrollbars?


How do I disable the scrollbars? If I can do that my problem should be solved, because that is the only issue I have with my iframes method.

QUOTE
It's much better to include the menu on each page. ..... or just copy the menu markup into each HTML page.


If I put the menu on each page how do I stop the opened link document from taking up the whole screen and therefore blocking the menu?

Robert


User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 24th April 2024 - 11:09 PM