1

This is my current situation, I want the logo and text in the header to align with the content and I have created a wrapper in the header of the same width (1130px but the header width is 1170px since the padding is 20px however as you can see, they won't align. I figured that the reason is because of the overscroll-y on the wrapper of the content which is causing a slight shift so I need a solution as to how to make them align.

.navigationWrapper {
  width: 1170px;
  margin: auto;
}

.navigationBar {
  background: rgba(0, 0, 0, 0.8);
  padding-top: 20px;
  padding-bottom: 20px;
  height: 35px;
  width: 100%;
  position: fixed;
  box-shadow: 0px 3px 5px #000;
  color: white;
  font-size: 32px;
  font-family: BurbankBigCondensed-Black, sans-serif;
  top: 0;
  text-align: center;
  display: -webkit-box;
  /* OLD - iOS 6-, Safari 3.1-6, BB7 */
  display: -ms-flexbox;
  /* TWEENER - IE 10 */
  display: -webkit-flex;
  /* NEW - Safari 6.1+. iOS 7.1+, BB10 */
  display: flex;
  /* NEW, Spec - Firefox, Chrome, Opera */
  align-items: center;
}

.navigationLogo {
  color: #ffa500;
  display: inline-block;
  float: left;
}

.navigationItem {
  display: inline-block;
  float: right;
}

.wrapper {
  margin-top: 75px;
  width: 100%;
  overflow-y: auto;
  height: calc(100vh - 75px);
  position: fixed;
}

.content {
  padding: 20px;
  margin-left: auto;
  margin-right: auto;
  min-height: 1500px;
  background: rgba(0, 0, 0, 0.5);
  width: 1130px;
  /*border-left: 1px solid #080808;*/
  /*border-right: 1px solid #080808;*/
}
<div class="navigationBar">
  <div class="navigationWrapper">
    <a>
      <div class="navigationLogo">Fortnite
        <font color="#ffae19">Pro</font>
        <font color="#ffb732">Snipes</font>
      </div>
    </a>
    <a>
      <div class="navigationItem">EU</div>
    </a>
    <a>
      <div class="navigationItem">NAE</div>
    </a>
  </div>
</div>



<div class="wrapper">
  <div class="content">
    ...
  </div>
</div>

How do I align both wrappers while maintaining the overscroll-y on the content wrapper?

Juan
  • 4,910
  • 3
  • 37
  • 46
sam yellow
  • 31
  • 3

0 Answers0