1
I would like to apply the property padding
in the navbar elements, except for the last element in the class nav-login
I use bootstrap 4.0
Html:
<nav class="navbar navbar-expand-lg navbar-light">
<a class="navbar-brand" [routerLink]="['/home']">EducaGeek</a>
<button class="navbar-toggler" type="button" (click)="isCollapsed = !isCollapsed"
[attr.aria-expanded]="!isCollapsed" aria-controls="collapseBasic">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" [collapse]="isCollapsed" [isAnimated]="true">
<ul class="navbar-nav mr-auto mt-2 mt-lg-0">
<li class="nav-item">
<a class="nav-link" [routerLink]="['/home']" routerLinkActive="active">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" [routerLink]="['/quemSomos']" routerLinkActive="active">Quem Somos</a>
</li>
<li class="nav-item">
<a class="nav-link" [routerLink]="['/metodologia']" routerLinkActive="active">Metodologia</a>
</li>
<li class="nav-item">
<a class="nav-link" [routerLink]="['/cursos']" routerLinkActive="active">Cursos</a>
</li>
<li class="nav-item">
<a class="nav-link" [routerLink]="['/loja']" routerLinkActive="active">Loja</a>
</li>
</ul>
<ul class="navbar-nav ml-auto mt-2 mt-lg-0">
<li class="nav-item">
<a class="nav-link nav-login" [routerLink]="['/login']" routerLinkActive="active">Login</a>
</li>
</ul>
</div>
CSS:
nav.navbar:not(a.nav-login) {
padding: 0.5rem 1rem;
}
But no effect appears on any element.