The right column in Bootstrap is covering up the left column

Does anyone know why I am encountering an issue with my bootstrap navigation bar? When I try to have two columns in the navigation bar and resize the viewport, the right column overlaps the left one. This issue seems to be happening when the viewport size is between 769px and 992px.

HTML

.site-wrapper {
     width: 100%;
     height: 100%;
     min-height: 100%;
     -webkit-box-shadow: inset 0 0 100px rgba(0,0,0,.5);
     box-shadow: inset 0 0 100px rgba(0,0,0,.5);
     border-top: 5px solid #5A332B;
     background-color: #ccbb99 !important;
    overflow-y: auto;
 }
.navbar {
    border-radius: 0;
    border: none;
    background-color: #683F36;
}
.navbar-brand {
    cursor: pointer;
    color: #ffffff !important;
    font-family: chalkitup, "sans-serif";
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<div class="site-wrapper">
  <div class="navbar navbar-default">
    <div class="container-fluid" style="background-color: #8c8c8c;">
      <div class="row">
        <div class="col-md-9" style="background-color: #1b6d85;">
          <div class="navbar-header">
            <a class="navbar-brand"><span class="icon ion-arrow-left-c"></span> Back</a>
          </div>
        </div>
        <div class="col-md-3" style="background-color: #3c763d;">
          Scoreboard
        </div>
      </div>
    </div>
  </div>

Answer №1

Use the code snippet provided below:

<div class="site-wrapper">
  <div class="navbar navbar-default">
    <div class="container-fluid" style="background-color: #8c8c8c;">
      <div class="row">
        <div class="col-md-9 col-xs-12" style="background-color: #1b6d85;">
          <div class="navbar-header">
            <a class="navbar-brand"><span class="icon ion-arrow-left-c"></span> Back</a>
          </div>
        </div>
        <div class="col-md-3 col-xs-12" style="background-color: #3c763d;">
          Scoreboard
        </div>
      </div>
    </div>
  </div>

To see a live example, refer to the snippet provided below:

.site-wrapper {
     width: 100%;
     height: 100%;
     min-height: 100%;
     -webkit-box-shadow: inset 0 0 100px rgba(0,0,0,.5);
     box-shadow: inset 0 0 100px rgba(0,0,0,.5);
     border-top: 5px solid #5A332B;
     background-color: #ccbb99 !important;
    overflow-y: auto;
 }
.navbar {
    border-radius: 0;
    border: none;
    background-color: #683F36;
}
.navbar-brand {
    cursor: pointer;
    color: #ffffff !important;
    font-family: chalkitup, "sans-serif";
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<div class="site-wrapper">
  <div class="navbar navbar-default">
    <div class="container-fluid" style="background-color: #8c8c8c;">
      <div class="row">
        <div class="col-md-9 col-xs-12" style="background-color: #1b6d85;">
          <div class="navbar-header">
            <a class="navbar-brand"><span class="icon ion-arrow-left-c"></span> Back</a>
          </div>
        </div>
        <div class="col-md-3 col-xs-12" style="background-color: #3c763d;">
          Scoreboard
        </div>
      </div>
    </div>
  </div>

Answer №2

After some investigation, I managed to uncover the solution to my initial query. The addition of the clearfix class to the initial column within the row rectified the issue at hand. While this approach resolved my problem, I am curious if there are alternative perspectives available.

Answer №3

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<div class="site-wrapper">
  <div class="navbar navbar-default">
    <div class="container-fluid" style="background-color: #8c8c8c;">
      <div class="row">
        <div class="col-sm-9 col-md-9" style="background-color: #1b6d85;">
          <div class="navbar-header">
            <a class="navbar-brand"><span class="icon ion-arrow-left-c"></span> Back</a>
          </div>
        </div>
        <div class="col-sm-3 col-md-3" style="background-color: #3c763d;">
          Scoreboard
        </div>
      </div>
    </div>
  </div>
  
  Make sure to include the col-sm-... classes for optimal viewing on small devices

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

I designed an innovative contact form utilizing mail function, yet unfortunately, the emails generated from it persistently land in spam folders. Below is the code I

I have created a contact form using the mail function, but all the emails are ending up in the spam folder. Here is my code: <?php // CODE FOR SENDING EMAILS if(isset($_POST['submit'])){ $to = "<a href="/cdn-cgi/l/email-protectio ...

What is the best way to apply various styles using the ng-style directive in different scenarios?

When working in Angular, I am attempting to apply different style attributes based on varying conditions. However, the typical conditional expression method is limited to just two conditions and is not providing the desired results. <div ng-style=" ...

Is there a way in JavaScript to prevent the enter key from triggering a mouse click event?

I am facing an issue with my program where I have multiple clickable buttons and the ability to submit by pressing the enter key. However, when I click several buttons with the mouse and then press enter, it not only submits the form but also acts as if ...

The perplexing problem of scrolling in Dojox/mobile/scrollableview

I've noticed some scroll issues with the dojox/mobile/ScrollableView (version 1.10+) in my cordova application, specifically on Android phones. This problem seems to be affecting other widget-based architectures and even some store apps as well. I wou ...

Adding numerous JSON attributes to an anchor tag in thymeleaf

How can attributes provided in a single string from JSON be appended to an anchor tag in Thymeleaf? When the attributes are separate, they can be iterated through and assigned individually. However, in this scenario, all the attributes come from the same ...

Tips for locating the highest number in JavaScript

I'm having trouble with my code where the first number, even if it's the largest, is not displaying as such. Instead, it shows the second largest number. Even when following suggestions, I encountered an issue where if the numbers are entered as ...

Passing a selected option in a select box to another website is achievable using JavaScript

I'm still learning JavaScript and I would like to have a user be directed to another page when they select an option from a dropdown menu. Any suggestions on how to accomplish this? ...

Manipulating lines and positions with jQuery

I am looking to implement a feature that allows users to choose a specific region on an image using jQuery. The functionality should be similar to the tagging feature on Facebook, but with the added bonus of being able to rotate and scale the selected area ...

Tips for styling list tooltips with CSS and Bootstrap

I am looking to style my tooltips using CSS, specifically I want the background of the tooltips to be gray and the text to be bold. The issue is that I am unsure how to do this, especially since I have a list with multiple options, each option having its ...

Populating Information on a Sideways Chronological Line

I am looking to develop a unique full-screen timeline web application that enables horizontal scrolling, displaying html-and-css-formatted text along with images, videos, and audio files. The timeline will begin at the present date on the right side, allo ...

Does adding !important to the @font-face rule validate it?

Can anyone help me with a problem I'm facing? I want to ensure that users are forced to use the web font instead of the font installed on their computers because the formatting is slightly different. I've looked into using !important but I'm ...

Restricting HTML Code within a DIV Container

I am currently developing a plugin and widget-centric CMS system. In this setup, a widget consists of a snippet of HTML/JavaScript code that is contained within a main div element known as the widget div. For JavaScript frameworks, I have opted to use jQ ...

Creating a sticky popup feature for your Chrome extension

Just starting out with chrome extensions and looking to create one that appends an external class to a selected tag. For example, let's say we have the following tag: <h1>extension</h1> When the user clicks on this element, I want to ad ...

CSS animation fails to execute

I created a rotating carousel using CSS. The carousel is constructed using the 'ul' tag. To navigate left or right, I dynamically add a 'li' element to the left or right of the list by cloning the necessary value and appending/prependin ...

Exploring the html element through Xpath

I am currently attempting to locate an HTML element using Selenium XPath and C#. Here is the code snippet of what I have experimented with: var element = Driver.FindElement(By.XPath("//img[text()='logo-home.png']/@href")); if (element.Display ...

Angular animation triggered when a specific condition is satisfied

I am working on an animation within my Angular application @Component({ selector: 'app-portfolio', templateUrl: 'portfolio.page.html', styleUrls: ['portfolio.page.scss'], animations: [ trigger('slideInOut&apo ...

Scrolling horizontally with scrollbar functionality

My goal is to create a webpage with a horizontally scrollable DIV element in the center, where the scrollbar appears only at the bottom of the DIV, not at the bottom of the entire page. I am wondering if it is possible to have a scrollbar placed at the ve ...

Issue with body element displacement when utilizing Bootstrap 5.2 toast component

While utilizing a Bootstrap 5 toast, I noticed that it causes the entire body to shift down. I suspect that there may be an issue with how I am handling relative and absolute positioning attributes, but I am uncertain. This is my first time using Stack Ove ...

Positioning Google Chart in HTML

I'm attempting to arrange three distinct Google pie charts in a horizontal layout. At present, I have applied inline CSS for formatting purposes. Oddly enough, the third chart always ends up on a separate line. Could anyone kindly point out my error? ...

Icons in small circles surrounding text in HTML

I am trying to add a small icon or image next to my HTML code on a webpage, but I can't seem to get it to display properly. Currently, the image is showing above the code instead of beside it. How can I adjust my code to achieve this? Below is the cod ...