I am currently utilizing the "Priority Navigation" design technique. This means that when the viewport width is reduced and there isn't enough space for all the list-items to fit horizontally, they are moved into another nested list under a "more" link for easy access.
In my example (linked below), this basic setup works well:
http://codepen.io/moy/pen/RrRJBe
However, I have encountered some issues:
1) Due to another item floating alongside the navigation, I had to set overflow:hidden;
on the nav. While this keeps the navigation aligned with the other content, it also hides the dropdown menu at the end because of the overflow property.
Are there any alternative CSS solutions for this problem?
2) Another issue arises when trying to position the nav links to the right by floating the div right. This causes performance issues, possibly related to script calculations regarding widths. Floating either the nav or its parent breaks the page!
The current setting of floating list-items left for horizontal display led me to experiment with using display:inline-block
and text-align:right;
for proper positioning. However, with limited space, the items either wrap or collapse into the "more" link altogether instead of gradually.
-
Browser compatibility: It is important to note that my browser support extends to IE8+, ruling out flexbox as a solution. Even if it were viable, finding a workaround for IE8/9 would be necessary.
If anyone has suggestions or knows of a plugin worth exploring, I would greatly appreciate the assistance. The script functions smoothly when the navigation is standalone, but integrating it with another item presents challenges. In a previous attempt, I calculated the width of the obstructing item and adjusted available space accordingly. However, this approach lacks flexibility - perhaps there is a better method?
Thank you in advance for any help offered!