Make the nav tabs in Bootstrap 4 stretch across the entire width of the screen with a bottom border

Looking for assistance with Bootstrap nav nav-tabs? How can I replicate the displayed behavior where the bottom border spans the full width of the screen and the tabs are centered on the page, as shown in this image? https://i.sstatic.net/WNRHB.png

Answer №1

.bottom {
    bottom: 10px;
    position: absolute;
    width: 100%;
}

Include the CSS class above in your stylesheet.

.bottom {
  bottom: 10px;
  position: absolute;
  width: 100%;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">

<body>
  <ul class="nav nav-tabs justify-content-center bottom">
    <li class="nav-item">
      <a class="nav-link active" href="#">Home</a>
    </li>
    <li class="nav-item">
      <a class="nav-link" href="#">Algo</a>
    </li>
    <li class="nav-item">
      <a class="nav-link" href="#">DS</a>
    </li>
    <li class="nav-item">
      <a class="nav-link" href="#">Languages</a>
    </li>
  </ul>

</body>

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

Deactivate a button based on a comparison condition

How can I prevent a button from being clickable when a specific condition is met? I attempted to do it this way, but it seems to be ineffective: <button type="text" disabled="{{candidature.statusCandidature.libelle == 'En cours' }}" >edit ...

Masking elements using CSS3 filters

Is it feasible to apply CSS3 filters as a mask? For example, I would like to blur only 30% of a div from the top. How can this be accomplished? I have created a small jsfiddle to demonstrate what I am attempting to achieve: http://jsfiddle.net/uxCXa/2/ ...

What steps can I take to prevent a css-generated svg file from occupying more space than the original image? My wave appears to be 239px tall, while the svg file is a massive 1500px in height

I utilized an online tool to generate custom SVG CSS at this link: Upon implementing it on my webpage, the rendering seems correct in terms of height and width. However, upon inspecting the page, I noticed that the SVG file dimensions are 1512px by 1512px ...

How to position an element to the left and another to the center of the screen while vertically aligning both using CSS

I have a single list and an h1 header. My goal is to position the list on the left side of the screen and center the h1 vertically in relation to the list. The size of the list is variable, so I want the height and width to adjust accordingly without overl ...

The sub-menu is being obscured by a PDF element in Internet Explorer, causing visibility issues

I have an object type tag on my page that displays a PDF file. Everything is functioning correctly, but in Internet Explorer, my sub-menu is being hidden behind the object tag. var objTag = $('<object></object>') .attr({ data: source ...

Minimize the styling of the input placeholder CSS

Here is the CSS I am using: #login-box ::-webkit-input-placeholder { color: #666; } #login-box :-moz-placeholder { color: #666; } #login-box ::-moz-placeholder { color: #666; } #login-box :-ms-input-placeholder { color: #666; } I attem ...

The server is currently pointing towards my local C drive directory instead of the desired message location

My goal is to create a functionality where, upon clicking the calculate button (without performing any calculations yet), the user will be redirected to a new screen displaying a response message that says "Thanks for posting that!". However, instead of th ...

What is the best way to rearrange images within a grid container?

I apologize for asking numerous questions, but could someone please guide me on how to position an image slightly to the right of center or just 1 inch to the left of center? http://jsfiddle.net/96d7udd7/ Below is the HTML code snippet: <figure class ...

Ensure that the file exists before including it in the $routeProvider template for ng-include

Using Angular routes, I have set up a system where the slug from the URL determines which file to load. The code looks like this: $routeProvider.when("/project/:slug", { controller: "ProjectController", template: function($routeParams){ return & ...

Determining the widths of elements when floated in Opera 11.*

I'm currently facing an issue with the Opera 11.5 beta (although I suspect this applies to all Opera 11 versions) where a floated block-level element (an unordered list) is being assigned a random fixed width, causing the child elements to wrap - simi ...

Sorry, the form submission could not be processed and unfortunately no error message was provided by: contact.php

Encountering an Issue This is the PHP code I am working with: <?php // PHP code goes here Here is a snippet of my HTML contact form code: <div class="col-lg-8"> <form action="contact.php" method="post" ro ...

Reveal content as you scroll

I'm having trouble with the code snippet below. My goal is to utilize .cbp-fbscroller in my CSS to show a new side navigation menu on my HTML page only when scrolling down to 900px. However, as someone who is new to JavaScript, I am struggling to make ...

Is it feasible for draggable divs to create a trail of lines as they are dragged?

Looking to create an interactive online coach tactic board where you can easily rearrange player positions and demonstrate specific tactics by dragging divs representing players. Utilizing Touch Punch for smooth dragging functionality on PCs, tablets, and ...

Beginning the phone application using either HTML5 or Cordova

Is there a way to use either HTML5 or Cordova (PhoneGap) to initiate a call to a phone number? I am looking to create a button that says "Call 555-555-5555", and when clicked, it opens the phone app on the device with that specific number. ...

What is the best way to achieve CSS rounded corners while keeping the border lines sharp?

Currently, I am utilizing the border-radius property to make the corners of a div rounded. In addition, there is a border line at the bottom of the div. Here is an example: <div style="border-radius: .5em; border-bottom: 1px solid black">Content< ...

Guide to adding a new font to your Ember project

I am currently in the process of developing a website utilizing the MEEN Stack framework (Mongo, Ember, Express, Node). One challenge I am encountering is importing the Lato font family into my project to serve as the main font for the entire site. Despite ...

Adjusting the layering of a nested element within a container div using

I am facing an issue with two buttons placed within a container div that is being overlapped by another container div. The bottom container overlaps the top one, rendering the buttons unclickable. I have been trying to find a solution to make the buttons ...

Adjusting the duration of the carousel in Bootstrap 4.2

Is there a way to alter the transition or fade duration of a carousel in BS4.2 using scripts? According to the BS documentation: Adjusting transition duration To modify the transition duration of .carousel-item, you can utilize the $carousel-transition Sa ...

Make the background image within a button stretch to completely cover the button

I need assistance with creating a button that has a large image as its background. The challenge I'm facing is that the image fits vertically within the button, but horizontally it repeats unless I use 'no-repeat', which leaves empty space i ...

Is the aspx page object linked to a MasterPage object page item?

Having trouble with a drop-down menu in my MasterPage file that keeps dropping behind objects on the ASPX page. I've tried using CSS to set different z-index values and position attributes, but it's not working as expected. Is this even possible ...