How to highlight current section in top nav menu? #2828
-
I'm using the daisyUI landing template and the top nav menu goes to sections in the same document. I want to highlight the current section like in this example For me it's enough if it comes selected by the anchor URL or when the section comes into the top of the viewport. I can do that from LiveView or JS but is there a pure daisyUI approach to this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I don't think so. Because JS can monitor the scroll position and check which section is currently on screen. But that's not something CSS can do. |
Beta Was this translation helpful? Give feedback.
-
That might be possible in crazy way of making six same themes and using That's my 1st idea. But don't do that 😅 |
Beta Was this translation helpful? Give feedback.
I don't think so. Because JS can monitor the scroll position and check which section is currently on screen. But that's not something CSS can do.