href active code example
Example 1: link active css
a:active {
background-color: #34D399;
}
Example 2: active link
# Foward slash is equal to homepage. For all others you use IN keyword.
<li
{% if '/' == request.path %}
class="nav-item active mr-3"
{% else %}
class="nav-item mr-3"
{% endif %}
>
<li
{% if 'about' in request.path %}
class="nav-item active mr-3"
{% else %}
class="nav-item mr-3"
{% endif %}
>
Example 3: css on click
something:active {}