html - why margin-right: auto has effect on justify-content? -
this question has answer here:
the following using bootstrap code version 4.
<div class="collapse navbar-collapse" id="navbarsupportedcontent"> <ul class="navbar-nav mr-auto"> <li class="nav-item active"> <a class="nav-link" href="/">dashboard <span class="sr-only">(current)</span></a> </li> <li class="nav-item"> <a class="nav-link" href="/requests/get">file request</a> </li> <li class="nav-item"> <a class="nav-link" href="/requests/send">send files</a> </li> <li class="nav-item"> <a class="nav-link" href="/history">history</a> </li> <li class="nav-item"> <a class="nav-link" href="/users">user management</a> </li> </ul> </div> .navbar-toggleable-md .navbar-collapse { display: -webkit-box !important; display: -ms-flexbox !important; display: flex !important; width: 100%; justify-content: flex-end; } .navbar-toggleable-md .navbar-nav { -webkit-box-orient: horizontal; -webkit-box-direction: normal; -ms-flex-direction: row; flex-direction: row; } .mr-auto { margin-right: auto !important; }
i wanted move ul
right, set justify-content: flex-end
on .navbar-collapse
. didn't work @ first until removed .mr-auto
.
i wondering why margin-right: auto
have effect on justify-content
?
Comments
Post a Comment