Skip to content
This repository has been archived by the owner on Jun 9, 2021. It is now read-only.

Intro Content - no active stat wanted #163

Open
bukowskicharles opened this issue Jul 21, 2017 · 2 comments
Open

Intro Content - no active stat wanted #163

bukowskicharles opened this issue Jul 21, 2017 · 2 comments

Comments

@bukowskicharles
Copy link

I have some introduction content before the sections with the „real“ content. Although none of the sections are visible on the screen my navigation has the „current“ class on the first item.

#Some content
#Some more content
#section-1
#section-2
#section-3
#section-4

Now, when I’m seeing the „#Some content“ Box which is pretty huge/high and fills the whole window my navigation shows the first li as active / current although the first section is not visible at all.

Any recommendations how to fix this?

Thanks in advance!
Fabi

@davist11
Copy link
Owner

You could probably add a navigation item for this intro section, but then hide it visually on the page.

@bukowskicharles
Copy link
Author

bukowskicharles commented Jul 24, 2017

Perfect! Thanks!

Just in case anyone is dealing with the same issue - you can handle it like this:

<ul>
  <li style="display: none;"><a href="/url/#doesnotexist">Hide This!</a></li>
  <li><a href="/url/#section-anchor-1">One</a></li>
  <li><a href="/url/#section-anchor-2">Two</a></li>
  <li><a href="/url/#section-anchor-3">Three</a></li>
  <li><a href="/url/#section-anchor-4">Four</a></li>
</ul>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants