Closed BartQ76 closed 3 years ago
Not every nav is a navbar. It should not be added to nav.
@Mister-42 You're right, I will look on it again later.
I've looked into this issue for Yii3 and couldn't find an out of the box solution. However. the solution for your code is already documented.
Edit: from your forum post I see you think the issue might be cause by the nav
class. Although technically it shouldn't really be there, I could not reproduce your issue caused by this class.
@Mister-42 thanks you commented this PR. I checked the problem again. The problem appears only when I am logged in to the application. I examine the CSS and found that logout button in navbar has an extra style defined in the web/site.css file:
/* align the logout "link" (button in form) of the navbar */
.nav li > form > button.logout {
padding: 15px;
border: none;
}
This particular padding:15px style interferes with the nav elements style 8px padding. This PR is groundless in this situation, so I close it.
Brief:
Small bug fix, discussed on forum: https://forum.yiiframework.com/t/bootstrap-4-migration-navbar-nav-items-align-problem/130917
What steps will reproduce the problem?:
The Nav::init method adds wrong css class '.nav' to the produced 'ul' element.
What's expected?
Nav::init method adds correct class '.navbar-nav'