active link

Solutions on MaxInterview for active link by the best coders in the world

showing results for - "active link"
Elias
09 Aug 2019
1# Foward slash is equal to homepage. For all others you use IN keyword.
2<li 
3  {% if '/' == request.path %}
4  	class="nav-item active mr-3"
5  {% else %}
6  	class="nav-item mr-3"
7  {% endif %}
8>
9
10<li 
11  {% if 'about' in request.path %}
12      class="nav-item active mr-3"
13  {% else %}
14      class="nav-item mr-3"
15  {% endif %}
16>
Johanna
22 Mar 2016
1#top-menu .current a
2{
3    color: orange !important;
4}
5
similar questions
django active link