title: Bootstrap - how can I have a sticky header?
body: <p>I would like to know how I can have a sticky header? I have been figuring out that for the whole day and still don't know how to do. Can anyone help me for that? What I want is that when I scroll down, the header will keep sticking on the top. </p>
  
  <p>These are my codes. Thanks a lot!</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>header {
    padding: 20px 0;
  }
  
  header .row,
  footer .row {
    display: flex;    
    align-items: center;
  }
  
  header h1 {
    font-weight: 700;
    margin: 0;
  }
  
  header nav {
    display: flex;
    justify-content: flex-end; 
  }
  
  header p {
    padding: 0 20px;
    margin: 0;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;Bo Kei Tuck Shop&lt;/title&gt;
          &lt;meta charset="utf-8" /&gt;
          &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"/&gt;
          &lt;link href='https://fonts.googleapis.com/css?family=Roboto:300,400,700' rel='stylesheet' type='text/css'&gt;   &lt;!--Google Font API--&gt;
          &lt;link rel="stylesheet" type="text/css" href="about_us_main.css"&gt;    &lt;!--CSS--&gt;
          &lt;script type='text/javascript' src='javascript/jquery-3.1.0.js'&gt;&lt;/script&gt;   &lt;!--jQuery--&gt;
          &lt;script type='text/javascript' src='javascript/jquery-ui.min.js'&gt;&lt;/script&gt;  &lt;!--jQuery--&gt;
          &lt;meta name="description" content="Free Web tutorials"&gt;  &lt;!--meta description--&gt;
          &lt;meta name="keywords" content="HTML,CSS,XML,JavaScript"&gt;    &lt;!--meta keywords--&gt;
          &lt;meta name="content-language" content="en-US"&gt;
      &lt;/head&gt;
  
      &lt;body&gt;
  &lt;!--header--&gt;
          &lt;header class="container"&gt;
              &lt;div class="row"&gt;
                  &lt;h1 class="col-sm-4"&gt;Bo Kei Tuck Shop&lt;/h1&gt;
                  &lt;nav class="col-sm-8"&gt;
                      &lt;p&gt;Hot Food&lt;/p&gt;
                      &lt;p&gt;Cold Food&lt;/p&gt;
                      &lt;p&gt;Snacks&lt;/p&gt;
                      &lt;p&gt;Drinks&lt;/p&gt;
                      &lt;p&gt;Contact Us&lt;/p&gt;
                  &lt;/nav&gt;
              &lt;/div&gt;
          &lt;/header&gt;
  
        &lt;/body&gt;</code></pre>
  </div>
  </div>
  </p>