Note that there are some explanatory texts on larger screens.

plurals
  1. POLogo in navbar, spacing above the navigation list, and below the logo
    primarykey
    data
    text
    <p>I have been trying to code a responsive header using Bootstrap 3, I just have one.</p> <p>There is a space above the navigation list, and below the logo as well. How can I line up the two of them? (logo&amp;nav)</p> <p>Picture of my header which explains the problem:</p> <p><img src="https://i.stack.imgur.com/zTmS6.png" alt="the header problem"></p> <p>My code:</p> <pre><code>&lt;!doctype html&gt; &lt;html lang="en"&gt; &lt;head&gt; &lt;meta charset="UTF-8"&gt; &lt;title&gt;Bootstrap&lt;/title&gt; &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt; &lt;link rel="stylesheet" href="css/bootstrap.min.css"&gt; &lt;link rel="stylesheet" href="css/custom4.css"&gt; &lt;script src="js/respond.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div class="row"&gt; &lt;nav class="navbar navbar-default" role="navigation"&gt; &lt;div class="navbar-header"&gt; &lt;img src="img/logo.png" alt="logo" class="visible-xs"&gt; &lt;button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#collapse"&gt; &lt;span class="sr-only"&gt;Toggle navigation&lt;/span&gt; &lt;span class="icon-bar"&gt;&lt;/span&gt; &lt;span class="icon-bar"&gt;&lt;/span&gt; &lt;span class="icon-bar"&gt;&lt;/span&gt; &lt;/button&gt; &lt;/div&gt; &lt;div class="container"&gt; &lt;div class="collapse navbar-collapse" id="collapse"&gt; &lt;img src="img/logo.png" alt="logo" class="hidden-xs push-left"&gt; &lt;ul class="nav navbar-nav pull-right"&gt; &lt;li&gt;&lt;a href="#" class="active"&gt;Home&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;pages&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Blog&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Portfilio&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Conact&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/div&gt; &lt;/nav&gt; &lt;/div&gt; &lt;!-- Javasctipt --&gt; &lt;script src="http://code.jquery.com/jquery-latest.min.js"&gt;&lt;/script&gt; &lt;script src="js/bootstrap.min.js"&gt;&lt;/script&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload