The height of Bootstrap 4 beta columns causes a conflict with the navigation bar,

Using Bootstrap Beta 4, I've encountered an issue where my nav element is overlapping my column div. What could be the cause of this problem?

<html>

<head>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" rel="stylesheet"/>

</head>

<body>
  <div class="container-fluid">
    <nav class="navbar navbar-expand-lg fixed-top navbar-light bg-light">
      <a class="navbar-brand" href="#">Nav Link</a>
      <div id=navbar class="collapse navbar-collapse">
        <ul class="navbar-nav">
          <li class="nav-item active">
            <a class="nav-link" href=#>Dashboard</a>
          </li>
        </ul>
      </div>
    </nav>

    <div class="row">
      <div class="col border">
        Left panel
      </div>
      <div class="col border">
        Right panel
      </div>
    </div>
  </div>
</body>

</html>

Answer №1

By eliminating the class fixed-top from your nav element, you can prevent the overlapping issue.

<html>
<head>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" rel="stylesheet"/>    
</head>    
<body>
  <div class="container-fluid">
    <nav class="navbar navbar-expand-lg navbar-light bg-light"><!--Removed fixed-top-->
      <a class="navbar-brand" href="#">Nav Link</a>
      <div id=navbar class="collapse navbar-collapse">
        <ul class="navbar-nav">
          <li class="nav-item active">
            <a class="nav-link" href=#>Dashboard</a>
          </li>
        </ul>
      </div>
    </nav>

    <div class="row">
      <div class="col border">
        Left panel
      </div>
      <div class="col border">
        Right panel
      </div>
    </div>
  </div>
</body>    
</html>

Another solution is to apply custom CSS to adjust the positioning of the nav element instead of removing the fixed-top class.

<style>
   .fixed-top{
       position:relative
   }
</style>

I hope this alternative method proves helpful! :-)

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

Issues with CSS3 Animation failing to trigger upon hovering over links

Background: Looking to design a visually appealing hover effect for links in the future Current Demo Link: You can view the demo here specifically on Firefox Browser. body { color:#ffffff; font-family:"Helvetica"; font-size:12pt; backgr ...

Sorry, but we are experiencing difficulties processing your request at the moment. HTTP ERROR 500: We are unable to locate the

My code seems to be functioning correctly when connecting to the database, but I'm encountering an error. Here is the code snippet: <?php include 'header.php'; ?> <!DOCTYPE html> <html> <head> <t ...

Steps to dynamically adjust an element's width in CSS depending on the presence of a separate element

I have a text input box appearing on the left side with a button positioned next to it on the right. For certain pages, I want to display a checkbox next to the input box and move the button below it. Is there a way to achieve this using CSS flexbox or a ...

Create a table by incorporating the information from the page along with additional content

I need to extract the data from a list and convert it into a table, add some additional content that I will provide, and then align the table accordingly. While I can easily align elements and already have the list, I am facing difficulty in converting it ...

Creating movement in an SVG patterned background

Currently in the process of designing a brand new website using NextJS and Tailwind. I am looking to incorporate an infinitely translating background effect that moves towards the bottom right, similar to this example (but with my own unique pattern): htt ...

What is the best way to align and adjust the position?

I'm attempting to attach a button to a page. I may not be an expert, but here's what I have so far: body { width:100%; height:100%; background:#181516; overflow:hidden; position:absolute; } .bg { background:url(../im ...

Latest Version of Bootstrap (v5.0.1) - Issue with Hamburger Menu not Auto-closing when Clicking on Anchor Links on

Hello fellow developers, I'm facing an issue with the hamburger menu in a responsive layout using Bootstrap v5.0.1. The problem is that the menu doesn't automatically close when clicking on anchor links within the same page, even though collapse ...

firefox image display problem caused by text overlapping

When viewing my page on a tablet, I am experiencing issues with overlapping elements that do not appear in desktop or mobile views. I have tried adjusting the viewport width without success. Any guidance on how to resolve this problem would be greatly ap ...

Modifying the font style and color of text within the table header - Material Table version 0.19.4

Recently, I began using React and Material UI but have encountered an issue with modifying the color and font of text in the table header. Despite attempting to override it, the default style remains unchanged. It has been mentioned that utilizing "heade ...

Achieving a smooth transition from a blur-out effect to a blur-in effect on a background Div

I created a blur in/out effect for my landing page, but it's not functioning as expected and I'm not sure why. It blurs out correctly, but the issue arises when I want the underlying Div to fade in. Currently, it just appears abruptly after the ...

The Jqueryui image link is not displaying the image despite no error being reported

Can anyone help me figure out what I'm missing? I'm currently working with ASP.NET MVC 5 and have downloaded the JqueryUI combined via Nuget package. Despite no error references for css/js files, the close button is still not showing in the ima ...

Guiding you to choose a specific child class by identifying its parent class in CSS and jQuery

Hey there! I'm currently working on a website that allows users to post content. I want to ensure that the site is mobile-friendly, so I need to make some adjustments with media queries. Unfortunately, I've run into an issue where media query CS ...

The overlay background is not covering the entire height of the container

The CSS includes a .wrapper with the style min-height: calc(50% - 30px), along with an overlay blur div to cover the entire height of the .wrapper element. Here's a link to a Codepen example showcasing this setup: https://codepen.io/palaniichukdmytro/ ...

Adjusting the letter spacing of individual characters using HTML and CSS

Is there a way to set letter-spacing for each character with different sizes as the user types in a text box? I attempted to use letter-spacing in CSS, but it changed all characters to the same size. Is there a possible solution for this? Here is the code ...

How can a div's height be adjusted based on the content of one sub div but not the other?

If I have a parent div with two child divs inside it, is it possible to set the parent div's height to auto, but only apply it to one of the child divs, while having the other child set to scroll for overflow-y? For example, you can see the issue her ...

Is there a way to position the menu above the button?

I need some help with my menu. Currently, it is showing up below the button and within my footer instead of above the content like I want it to. If anyone can assist me in understanding what I am doing wrong, I would greatly appreciate it. Thank you for ta ...

How can you remove the border when an input is in focus on Chrome or Microsoft Edge?

I need to style an input field in a way that removes the black borders/frame that appear around it when clicked on in Chrome and MS Edge. Strangely, Firefox does not display this frame/border. How can I achieve this consistent styling across all browsers? ...

Mystery factor triggering the appearance of scrollbar as the window is resized to a specific width threshold

I'm facing a rather peculiar problem. I'm currently in the process of creating a webpage tailored for an iPhone screen resolution of: width: 640; height: 960; However, there seems to be a mysterious hidden element that is extending the width of ...

What is the process for obtaining Style.css, additional CSS, and JavaScript files from a live single page website?

I am currently facing a challenge with a live single page website where I need to make some fixes. Unfortunately, I am unable to access the Style.css file, along with other css and javascript files. Although I managed to save the html file by using Ctrl+s, ...

Troubleshooting Bootstrap 4 carousel malfunction in a Laravel 5.8 application

I am currently working on a Laravel project (v5.8) and using the default Bootstrap 4 that comes with it as my frontend CSS framework. Everything is functioning perfectly except for the carousel, which seems to be causing some issues. I suspect that the pro ...