mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-13 17:14:04 +02:00
Fix navbar docs - active nav-link (#32589)
* Fix navbar docs - active nav-link * Update navbar.md Co-authored-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
@@ -124,9 +124,9 @@ Adding images to the `.navbar-brand` will likely always require custom styles or
|
|||||||
|
|
||||||
Navbar navigation links build on our `.nav` options with their own modifier class and require the use of [toggler classes](#toggler) for proper responsive styling. **Navigation in navbars will also grow to occupy as much horizontal space as possible** to keep your navbar contents securely aligned.
|
Navbar navigation links build on our `.nav` options with their own modifier class and require the use of [toggler classes](#toggler) for proper responsive styling. **Navigation in navbars will also grow to occupy as much horizontal space as possible** to keep your navbar contents securely aligned.
|
||||||
|
|
||||||
Active states—with `.active`—to indicate the current page can be applied directly to `.nav-link`s or their immediate parent `.nav-item`s.
|
Add the `.active` class on `.nav-link` to indicate the current page.
|
||||||
|
|
||||||
Please note that you should also add the `aria-current` attribute on the `.nav-link` itself.
|
Please note that you should also add the `aria-current` attribute on the active `.nav-link`.
|
||||||
|
|
||||||
{{< example >}}
|
{{< example >}}
|
||||||
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
||||||
|
Reference in New Issue
Block a user