Incorporate numerical increments onto the Bootstrap progress bar

Is there a way to incorporate steps (circles with numbers inside) on top of a Bootstrap 4 progress bar that are equally spaced? I have been considering the following approach:

// css
.wrapper-progress-step {
  /* what should go here? this would ensure that steps are positioned on top of the bar */
}

.steps {
  /*what should go here? possibly set position to relative to place them on top of the bar */
}

.circle {
  width: 30px;
  height: 30px;
  text-align: center;
  padding: 6px 0;
  font-size: 12px;
  line-height: 1.428571429;
  border-radius: 15px;
  margin-top: 0;
}
<div class="wrapper-progress-step">
  <div class="progress">
    <div class="progress-bar bg-success" role="progressbar" style="width: 80%" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100">
    </div>
  </div>
  <!-- these steps should be placed above the progress bar, dividing it into equal spaces -->
  <div class="steps">
    <div class="circle">1</div>
    <div class="circle">2</div>
    <div class="circle">3</div>
    <div class="circle">4</div>
  </div>
</div>

Answer №1

.sections {
  display: flex;
  justify-content: space-evenly;
  width: 100%;
 }

Using Flexbox allows for seamless division of content. It's a helpful tool to guide your layout in the right direction.

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

The property cannot be set for an undefined element in Jquery UI slider tabs

There seems to be some extra space at the bottom of the slider tabs between the navigators and content. Additionally, I am facing a challenge in making the page responsive as the content size does not adjust when I resize the window. To see the changes, I ...

The alignment of Bootstrap's Tabs is not centered as expected

I'm having trouble aligning the tab list to the center. The image below shows that it's currently shifted to the left. I've already included the Bootstrap class center-block, but it doesn't seem to be working. Can anyone help me out wit ...

Creating tabbed content with a classless CSS design by utilizing radio buttons instead of the traditional unordered

I am attempting to transform the classless CSS and HTML provided below from a list format to using radio buttons and labels for tabbed content. My goal is to make it concise and avoid redundancy. Here is the setup of what I am aiming for: <nav> ...

Creating a key-shaped design with CSS: A step-by-step guide

Looking to create a unique shape within an HTML div? By utilizing custom CSS in an HTML table, I can design a layout where one column features a rounded avatar while the other displays a rectangular box. However, I am struggling to make the circle overlap ...

The nested CSS grid is failing to show its nested elements on the page

Having trouble with a nested CSS GRID - the child grid items are not appearing correctly despite multiple checks on the markup. The first grid row should span three columns, as it does, and is set to display:grid with 2 child grid items. However, the chil ...

Adjusting input height with CSS in Google Chrome

When I define an input element with the following CSS properties: input { border: none; font-family: arial, sans-serif; font-size: 16px; line-height: 16px; padding: 0; } I anticipate the height of the input to be 16px, however, upon inspecting ...

A row divided into three segments in Twitter Bootstrap2, with the second segment spanning the rest

Looking to divide a row into three segments under the following conditions: The first segment should have a maximum height and always stay at the top (minimum height of 0; maximum height of 40%). If the content exceeds the max-height, a scroll bar sho ...

The module 'FloatingLabel' cannot be found in the 'react-bootstrap' library

Struggling to import the FloatingLabel component from react-bootstrap as outlined in the official bootstrap documentation. Despite following the instructions, I keep receiving an error message indicating that FloatingLabel is not exported from react-bootst ...

``The issue concerning the preloading layer on the website``

My experience with the website www.wirecreation.net is sometimes marred by an issue during the initial load. It seems that there is a margin of a few pixels on the gray div containing the logo and progress bar at times, but other times it appears with zero ...

Adjusting font size in CSS for HTML websites

Having some trouble adjusting the font size on my HTML webpage using CSS - for some reason, the "font-size" property isn't cooperating: Below is the snippet of HTML code for my site: And here's a brief look at the accompanying CSS code: I&apos ...

Tips for properly utilizing the collapse feature

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"> <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popp ...

Column with a set width in Bootstrap

Is it possible to create a fixed width right column in Bootstrap while keeping the left column responsive? I am currently working with Bootstrap 2.3.2 https://i.stack.imgur.com/xOhQo.png (source: toile-libre.org) I want the right column to maintain it ...

The best way to choose an element that lacks a class beginning with a specific prefix

Trying to apply a style for all input elements that do not have a class starting with "border-radius": input:not(class^="border-radius") { This method is not producing the desired result. Any alternative suggestions? ...

Creating a datepicker with both a start date and end date display

I'm trying to set up a jQuery UI datepicker to select a range of dates from start to end, but for some reason, part of the code isn't functioning properly. I've gone through it multiple times and can't seem to find any errors. Is there ...

Using CSS to layer a background image

Let's explore combining multiple layers as background images using HTML5 and CSS3: <div style="background-image: url(layer1.png)">...</div> To add the next layer, we can use the following CSS code: div { background-image: url('la ...

Content remains connected to the left side of the webpage in a single column, adapting to different screen sizes

Can someone help me with this issue: RWD I have been struggling to center these elements in a single column when the screen size is less than 960px. I have tried using margin: 0 auto; but it doesn't seem to be working. Any suggestions? ...

Troubining CSS nth-of-type or child selectors with custom elements within additional custom elements may cause unexpected behavior

Struggling with CSS :nth-child and creating a unique layout with custom elements inside custom elements. The issue arises when trying to display different icons using the :before pseudo-element, but all icons end up being the same. Below is the code snippe ...

Unexpected behavior with HTML Bootstrap's dl-horizontal layout

Despite having the div class "dl-horizontal" within the table, the dl-horizontal fields are displaying outside the table. Here is the code I used: <!DOCTYPE html> <html lang="en> <head> <title>Bootstrap Example</title> ...

Align the heading vertically when the div is set to position:absolute

I'm looking to center the heading text vertically within the div, but currently it is being pushed down with margin-top which is causing issues when the titles spill over onto a second line. For reference, please check out the example here: HTML ...

The scroll bar will be automatically reset once the content inside is updated by using the $selector.html() function

I am looking to create a dynamic scrollable content feature. Initially, I retrieve the data and set the content as follows: $("#sub_menu li").on("click", function () { $("#gallery").html(get_html($(this).attr("id"))); $("#gallery").cs ...