Bootstrap 4 nav bar

1

Good morning This is the code that I use in my menu bar, but when you do the collapse the button gets to the whole size of the bar making the logo icon up, I wanted the collapse button to stay the way it should be (square). The css code is from Bootstrap4

<navclass="navbar navbar-expand-md bg-dark navbar-dark fixed-top">
    <a class="navbar-brand" href="#"><img src="img/#.png" alt="#" width="25" height="25"></a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
        <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="collapsibleNavbar">
        <ul class="navbar-nav mr-auto">
            <li><a class="nav-link" href="#.php">#</a></li>
            <li><a class="nav-link" href="#.php">#</a></li>
            <!--li><a class="nav-link" href="#.php?id=">#</a></li-->
            <li><a class="nav-link" href="#.php">#</a></li>
            <li><a class="nav-link" href="#.php">#</a></li>
            <li><a class="nav-link" href="#.php">#</a></li>
        </ul>
        <ul class="navbar-nav">
            <li class="nav-item">
                <a class="nav-link" href="password.php">Password</a>
            </li>
            <li clas="nav-item">
                <?php 
                    date_default_timezone_set("Europe/Lisbon");
                    echo '<a class="nav-link">'.date("d-m-Y").'</a>';
                ?>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="<?php echo $logoutAction ?>">Logout</a>
            </li>
        </ul>
    </div>
</nav>
    
asked by anonymous 20.12.2017 / 10:54

1 answer

0

See here your code running on BS4 , did not show BUG, I only commented the <script> to not give error in the snippet StackOverflow

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Page Title</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" type="text/css" media="screen" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" />
    <link rel="stylesheet" type="text/css" media="screen" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" />
</head>
<body>
    
    <nav class="navbar navbar-expand-md bg-dark navbar-dark fixed-top">
        <a class="navbar-brand" href="#"><img src="http://placeskull.com/16/16"alt="#" width="25" height="25"></a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="collapsibleNavbar">
            <ul class="navbar-nav mr-auto">
                <li><a class="nav-link" href="#.php">#</a></li>
                <li><a class="nav-link" href="#.php">#</a></li>
                <!--li><a class="nav-link" href="#.php?id=">#</a></li-->
                <li><a class="nav-link" href="#.php">#</a></li>
                <li><a class="nav-link" href="#.php">#</a></li>
                <li><a class="nav-link" href="#.php">#</a></li>
            </ul>
            <ul class="navbar-nav">
                <li class="nav-item">
                    <a class="nav-link" href="password.php">Password</a>
                </li>
                <li clas="nav-item">
                    <?php 
                        date_default_timezone_set("Europe/Lisbon");
                        echo '<a class="nav-link">'.date("d-m-Y").'</a>';
                    ?>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="<?php echo $logoutAction ?>">Logout</a>
                </li>
            </ul>
        </div>
    </nav>
    
    <!-- <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js"></script><scriptsrc="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.bundle.min.js"></script> -->
</body>
</html>
    
20.12.2017 / 11:51