I have been designing using semantic UI but the problem i face is in using tabular menu. The square block at the side in the menu is not changing when i select another menu item .It is still remaining at the home page while the content in the segment changes. Have a view at the documentation. Image-Though i have clicked meal planner the square block denoting the menu item remain at home
Related
I have a website that displays content based on items checked in a menu list. If the screen width gets too small the menu is rotated and hidden. Additionally, a burger button is displayed. If the burger button gets activated (checkbox as well), the menu is unhidden and the content is hidden.
Neither the content nor the menu have access to the checkbox behind the burger button, because they are children of a sibling of the burger button.
As a result, if a menu item was checked, the burger button is not unchecked, and the visitor needs to click on the burger button again to close the menu and see the content.
Somehow I need to find a hack to uncheck the burger button, if a different menu item was selected, or if a menu item was clicked.
JavaScript is not required yet and shall never be used.
I hope someone knows a hack to fix this - I am clueless in this case...
Thank you for your numerous comments.
The answer is quite simple: CSS3 can't do what I tried to achieve. There was no trick at all to get this done, not even involving the :target pseudo-class, because CSS can't manipulate and reset the URL anchor, neither can it untick the checkbox. That caused the menu staying visible after selecting the content as mentioned above.
As a result, I have rewritten the whole website (well, not the content to be precise).
There is a theoretically simple solution: Using sibling radio buttons for all controls.
This means:
I have one radio button for the burger menu. It accesses the following (sibling) <div> element with the adjacent sibling combinator (+) and toggles the burger menu on and off. (Which results in a changed visibility property.)
I have multiple radio buttons for the content. Succeeded by their respective content div analogously to (1.).
I have multiple labels all over the place that address these radio buttons by using their for attribute. Fortunately, the for attribute has multiplicity 1:n, so that it was possible to address the content <div>s by both, the <nav>-bar, displayed for high resolution devices, as well as the burger menu, displayed on low resolution devices on click on the burger button which is not visible for high resolution displays.
So as a result, I don't do any menu transformations, but have just duplicated the <label>s for these toggles and display either the <nav> bar or the burger button.
Downsides:
I lost the ability to keep the style of the <label>s for the currently active content changed while this content is displayed, since these <label> elements are not siblings of their corresponding checkbox/radio anymore, but on :hover there is an effect.
It is not possible to have the burger menu displayed leaving the current content displayed as well in the background. Both are and need to be in the same radio button group, which means that the burger menu is displayed instead of other content until a label is clicked in the burger menu.
Why am I even doing this (Benefits):
From my perspective, running scripts on a visitors machine is like highjacking their compute power on their device in their sphere and by forcing them to activate JavaScript or other stuff, exposing them to serious risks that could be avoided. So as a result, I consider the unnecessary use of JavaScript as an unethical act.
With this hiding technique of the content I am able to transfer all the content to the visitor a single time and allow for a perfect experience once the content is loaded.
So, I'm working on a page implemented with Bootstrap 4 and using anchor/hash-based navigation to take users up and down the page. What I'm unclear about is how to control what is actually in view when the page auto-scrolls to the anchor fragment?
Essentially, what I'm looking to do is somehow ensure that at least the section heading is visible, and more or less aligned to the viewport. I am using a fixed-top navigation bar
So, what determines what is "in frame" when an anchor is clicked and the page scrolls to the anchor location? Is this a question of keeping the anchor elements a certain size? So, in essence, what do I need to do via css or html to get section heading in view when they're clicked?
Good evening community,
I have a problem related to a vertical menu that is scrollable when there are more items in the menu than the page can take vertically. If I scroll down to an item that is not displayed on the screen when I'm at the top of the menu and I click this item to get to the respective page, the page will get loaded but the menu jumps back to the top, so that the item i just clicked is not displayed on the screen again. But I want that the part of the menu with the item is shown when the new page is loaded and not the top of the menu.
I'm developing my site with python and django and using bootstrap for frontend, if that helps with my problem.
I will add some pictures to visualize my problem. Sadly i can't post pictures directly yet.
Starting Position 1 <- This is the top of the menu with the page 'Einführung' loaded
Scrolled Position 2 <- This is the scrolled position and I want to click the 'Print-Funktion'-link
Top Position 3 <- This is the menu after I clicked on the link (top position)
Scrolled Position 4 <- This is the menu when I scroll down after I clicked on the link
I numbered the pictures for easier reference. Currently the menu is in the state of the 3rd picture after I clicked on the link but I want the menu to be in the state of the 4th picture.
Edit1:
I forgot to add how I made the menu scrollable. I used the malihu-custom-scrollbar-plugin. The Plugin
Thank you in advance for your answers!
I've found a solution which is not perfect, because it will always jump to the top for some milliseconds after clicking on a link and then to the desired position.
I've used this when the page is loading
$(selector).mCustomScrollbar("scrollTo",position);
I have a pure CSS navigation menu with a drop-down section based on some automated menu creation tool and heavily edited.
Previously the drop down was a single column but now, with increased number of pages, it needs to have multiple columns to remain neat looking.
The problem is now the drop-down menu covers my form (where it previously didn't), which is fine, but when moving your mouse over links in the menu the thing closes if you touch any form fields that are behind it.
Menu CSS is probably too long to paste here. Is there a way to stop the drop down from closing when touching elements behind it with the mouse?
Set the z-index of the menu to a high number. Should keep it above other elements.
I currently have a site with a menu in a frame on the left and the content in a frame on the on the right. I want to move the menu frame to the top of the page (horizontal instead of vertical), but I want the menu to move up off the visible page when scrolling on a large content page, as though the menu was part of the content.
Note: I do not want to render the menu on the content page as all the current links target specific frames/windows and I would like to not have to render the menu on every request.
If you're asking whether it's possible to scroll a frame off the page, it is. Just use an IFrame. http://www.w3.org/TR/html4/present/frames.html
Just be aware that if you had lengthy dropdowns in your vertical frames, they may get truncated in a horizontal "menu" in an iframe of limited height.