Navbar disappearing while lowering resolution

1

I'm setting up a project with Bootstrap but I'm facing some problems, one of them is the navbar disappearing when the resolution decreases. The other is that I can not type a title right in the middle of the screen.

Problem Navbar

HTML

<headerid="header">
     <div id="header-overlay"></div>
    </header>
    <div id="col-md-12">
    <nav class="navbar navbar-expand-md fixed-top py-3 box-shadow mt-5">
     <a href="index.html" class="navbar-brand">LOGO</a>

    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Abrir Navegação">
      <span class="navbar-toggler-icon"></span>
    </button>

    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto">

        <li class="nav-item">
          <a class="nav-link text-white" href="#sobre">Sobre</a>
        </li>
        <li class="nav-item">
          <a class="nav-link text-white" href="#solucoes">Soluções</a>
        </li>
        <li class="nav-item">
          <a class="nav-link text-white" href="#contato">Contato</a>
        </li>
        <li class="nav-item dropdown">
          <a class="nav-link dropdown-toggle text-white" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">PT</a>
          <div class="dropdown-menu" aria-labelledby="navbarDropdown">
            <a class="dropdown-item" href="#">EN</a>
            <a class="dropdown-item" href="#">ES</a>
          </div>
        </li>
        <li class="nav-item ml-3">
          <button type="button" class="btn btn-outline-light btn-lg">Entrar</button>
        </li>
      </ul>
    </div>
  </nav>
</div>

CSS

/*Header*/
#header {
 background: url("../img/header-bg.jpg");
 background-size: cover;
 background-position: center;
 position: relative;
 top: 0;
 bottom: 0;
 height: 90%;
 z-index: -10;
 }

#header-overlay {
 position: absolute;
 background-color: rgba(0, 0, 0, 0.4);
 top: 0;
 bottom: 0;
 height: 100%;
 width: 100%;
 z-index: -5;
}

Another problem I'm facing is that I need to write a text in the middle of this screen, but when I write it it continues on the side of navbar and if I get the tag nav it writes below, I need to put the text on the image and when the image ends up getting the contents of the site.

    
asked by anonymous 20.12.2018 / 19:16

1 answer

1

First your Navbar BTN is there, it just does not show up because you did not use a color class in Navbar type navbar-light , or navbar-light . In the example I put navbar-dark pro btn white.

About the text I do not understand ... if you want the text after the image just put a container>row>col> your text, see the example to understand better. To align in the center text use the Bootstrap native class text-center

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}
  /*Header*/
#header {
 background: url(https://placecage.com/300/200);
 background-size: cover;
 background-position: center;
 position: relative;
 top: 0;
 bottom: 0;
 height: 90%;
 z-index: -10;
 }

#header-overlay {
 position: absolute;
 background-color: rgba(0, 0, 0, 0.4);
 top: 0;
 bottom: 0;
 height: 100%;
 width: 100%;
 z-index: -5;
}

#header h1 {
  position: relative;
  top: 45%;
}
<link rel="stylesheet" type="text/css" media="screen" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" />

<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script><scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script><scriptsrc="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/js/bootstrap.bundle.min.js"></script>

<header id="header">
  <div id="header-overlay"></div>
  <h1 class="text-center text-light">Meu texto 123</h1>
</header>
<div id="col-md-12">
  <nav class="navbar navbar-expand-md navbar-dark fixed-top py-3 box-shadow mt-5">
    <a href="index.html" class="navbar-brand">LOGO</a>

    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
      aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Abrir Navegação">
      <span class="navbar-toggler-icon"></span>
    </button>

    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto">

        <li class="nav-item">
          <a class="nav-link text-white" href="#sobre">Sobre</a>
        </li>
        <li class="nav-item">
          <a class="nav-link text-white" href="#solucoes">Soluções</a>
        </li>
        <li class="nav-item">
          <a class="nav-link text-white" href="#contato">Contato</a>
        </li>
        <li class="nav-item dropdown">
          <a class="nav-link dropdown-toggle text-white" href="#" id="navbarDropdown" role="button" data-toggle="dropdown"
            aria-haspopup="true" aria-expanded="false">PT</a>
          <div class="dropdown-menu" aria-labelledby="navbarDropdown">
            <a class="dropdown-item" href="#">EN</a>
            <a class="dropdown-item" href="#">ES</a>
          </div>
        </li>
        <li class="nav-item ml-3">
          <button type="button" class="btn btn-outline-light btn-lg">Entrar</button>
        </li>
      </ul>
    </div>
  </nav>
</div>
    
20.12.2018 / 19:33
How to add and remove rows and columns in html table with jquery ___ ___ erkimt Error generating XML ______ qstntxt ___

I made a system in PHP to display XML file, but is giving the following error:

This page contains the Following Errors: error on line 29 at column 1: Extra content at the end of the document Below is a rendering of the page up to the first error.

(A picture for you to see that even what is the bench he brings me):

Myindex.phpfile:

%pre%

Myconfig.phpfile:

%pre%

Myconexao.phpfile:

%pre%    
_________azszpr349229

As the very description of error states, you are inserting extra others information after creating the XML from the line %code% .

To parse the XML correctly, remove all of the line is %code% down. If you remove the line% %code% the error disappears, but you will result in a normal HTML page (although invalid).

    
___