How to leave my content on the sidebar and not behind?

1

Imademysidebarresponsiveincss,however,thecontentwasleftbehind,howdoIleaveitaside

/*MENU*/

#bs-sidebar-navbar-collapse-1 {
  width: auto;
  height: 100%;
  overflow-y: hidden;
  background: #1f262d;
  font-family: "Open Sans", sans-serif;
  font-size: 12px;
  font-weight: 20px;
  opacity: 0.9;
  padding: 0px;
  z-index: 1;
}


/*CONTEÚDO*/

#sidebar-wrapper {
  position: absolute;
  width: auto;
  height: 100%;
  overflow-y: hidden;
  background: #1f262d;
  font-family: "Open Sans", sans-serif;
  font-size: 12px;
  font-weight: 20px;
  opacity: 0.9;
  z-index: 2;
}
    
asked by anonymous 14.06.2017 / 17:44

1 answer

0

Use the z-index property of CSS. Where the increasing or decreasing values determine the positioning of the element, provided they have a defined position. Ex:

 #elementoA{
position: absolute;
background-color: blue;
height: 90px;
width: 90px;
z-index: 1;  }

#elementoB{
position: absolute;
background-color: red;
height: 90px;
width: 90px;
z-index: 2;  }

This link has a more enlightened reading of the subject.

    
14.06.2017 / 17:51