i'm creating my first site with Bootstrap and i'm dealing with a login/logout button in the nav bar.
Here is my HTML code:
<ul class="nav navbar-nav navbar-right">
<li><a href="#">Item1</a></li>
<li><a href="#">Item2</a></li>
<li><a href="#">Item3</a></li>
<li><a href="#">Item4</a></li>
<?php
if (isset($_SESSION['logged_in']) && $_SESSION['logged_in'] === TRUE) {
?>
<li><a href="logout.php" class="btn btn-primary navbar-btn" type="button" role="logout">Logout</a></li>
<?php
} else {
?>
<li><button class="btn btn-success navbar-btn" type="button" data-toggle="modal" data-target="#signInModal">Login</button></li>
<?php
}
?>
</ul>
Please have a look at how they appear:
What could be the problem? Why logout button became bigger?
In addition, please have a look at what happens if i view them in a small screen/window:
This time i have view problems in both cases: in the first case the login button should be aligned with the previous items; in the second case it is wrong at all.
What could be the matter?