Seperating circles with a sleek HTML line

I'm attempting to create something similar to this:

https://i.sstatic.net/lXELt.png

However, this is the result I've been able to achieve.

https://i.sstatic.net/Ieya0.png

Can you assist me in achieving the desired outcome?

UPDATE:

The issue resolves if I eliminate the bootstrap.css dependency. How do I make it function with bootstrap?

CodePen (add bootstrap.css in the settings to see the problem)

.time-slice {
  display: flex;
  align-items: stretch;
}

.time-slice > * {
  padding: 20px;
}

.circle {
  width: 16px;
  height: 16px;

  background: #ffffff;
  border-radius: 32px;
  display: block;
  border: 2px solid #1A87B9;
}

.circle-wrap {
  position: absolute;
}

.circle-wrap > .circle {
  position: relative;
  left: -30px;
}

.date-time {
  flex-shrink: 0;
  flex-basis: 60px;
}

.date,
.time {
  max-width: 90px;
  color: #999999;
  font-size: 13px;
  margin-top: 0;
  margin-bottom: 10px;
}

.point-title {
  border-left: 2px solid #1A87B9;
}
<div id="ticketDetails">
    <h1>Details</h1>


    <div class="time-slice row">
        <div class="date-time">
            <p class="time">10h 30min</p>
            <p class="date">&nbsp;</p>
        </div>
        <div class="circle-wrap">
            <div class="circle"></div>
        </div>
        <div class="point-title">
        <span>
          <b>Amsterdam (Schiphol)</b>
        </span>
        </div>
    </div>

    <div class="time-slice row">
        <div class="date-time">
            <p class="date">Fri 28 Aug</p>
            <p class="time">20:00</p>
        </div>
        <div class="circle-wrap">
            <div class="circle"></div>
        </div>
        <div class="point-title">
        <span>
          <b>Manchester (MAN)</b>
        </span>
        </div>
    </div>

</div>

Answer №1

The issue lies in the usage of * {box-sizing: border-box} by Bootstrap. You can resolve this by either reverting to the default box-sizing: content-box for .circle (view fixed codepen demo) or consider the impact of this property when sizing/aligning your elements.

Answer №2

modify

.square-wrap {
  position: fixed;
  > .square {
    position: relative;
    right: -50px;
  }
}

and change it to

.square-wrap {
  position: fixed;
  & > .square {
    position: relative;
    right: -50px;
  }
}

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

Using CSS3 to showcase image captions

I am facing an issue with displaying captions on my images. The caption needs to display in two different ways - normal and hover. To better explain, I have included an image for reference. Although I have made progress with a large portion of this task, ...

Steps for building a Bootstrap grid of thumbnails

I need to display an unknown number of thumbs. Below is a sample of the HTML rendered: <div class="row-fluid"> <ul class="thumbnails"> <li class="span3"> <a href="#" class="thumbnail"> &l ...

Is there a way to properly center this text vertically within the row?

The kids are like puzzle pieces. I've experimented with different classes like justify-content-center, align-items-center, and text-center, but no luck. All I want is for the text to be perfectly centered both vertically and horizontally within the ...

I'm having trouble getting my button to work with addEventListener while using Ejs and Express. What could

Creating a Twitter-like platform where I can post tweets and have them display on the same page has been quite challenging. I've set up each post to have an Edit button initially hidden with 'display:none'. However, when I try to click on th ...

Looking to boost the height of ngSelect options?

Need help with adjusting the dropdown height for the ng-select form image. Currently, it is only displaying 5 items and I would like it to show 8-10 items. Below is the code I am using: <form [formGroup]="addReportForm" class="form-hori ...

Utilizing Python and Selenium with PhantomJS to convert multiple files into PDFs

I have been working on implementing the code provided in Python + Selenium + PhantomJS render to PDF Instead of saving a single web page as a PDF file, I am trying to iterate through a list of URLs and save each one with a specific name taken from ano ...

Instructions on converting text to a Float value and displaying the calculated result in a separate div

I am attempting to extract a string from a div, clear its content, then retrieve the actual price from ".skuBestPrice", remove any special characters, perform calculations to convert it into a floating point number, and display this number in the div ".tot ...

Ways to insert a color into an HTML text box based on a condition

Hey everyone, I need some help with changing the color of a textbox in cshtml. Here is the code snippet I am working with: $("#BUTTON").click(function (event) { var urlPA = URL; var crty = $("#Courtesy").val(); var fname = $("#Familyname").val ...

What is causing the error message "Error: Cannot update active font: 'Fira Sans' is not included in the font list" in react-font-picker?

For my project, I have implemented a font picker component in the following manner: <FontPicker apiKey={process.env.REACT_APP_GOOGLE_API_KEY} activeFontFamily={activeFontFamilyMobile} ...

Having trouble executing JavaScript upon form submission

Attempting to implement form validation on an email reset page. Here is the code I have written: <!DOCTYPE html> <html> <head> <title> form validation </title> <script> function validateForm ...

The optimal method for designing a select menu to ensure it works smoothly on various web browsers

Recently, I encountered an issue with customizing a select menu using CSS and jQuery. After some work, I was able to achieve a result that I am quite pleased with: So far, the styling works perfectly in Mozilla, Opera, Chrome, and IE7+. Below is the curr ...

Is there a way to deactivate both my input field and its associated content by choosing a specific option?

I have been searching for a solution to my problem without any success. I'm currently learning javascript and jquery, and I want to figure out how to disable the <input> and its data when the option "none" is selected. My first attempt involved ...

What is the best way to incorporate three distinct conditional border colors?

I am trying to customize an icon button by having three different border colors - one for the regular state, one for when hovering, and another for when the icon is clicked. Currently, I am working with React and have a function that checks if the curren ...

Align an image in the center of a div without using absolute positioning

I'm currently facing an issue where I need to align an image at the center of a div without using absolute positioning. This is necessary because the image spills over into any adjacent divs on the page. Specifically, I have a previous div containing ...

When a Grid Item is enclosed in a link, it does not extend over rows

After avoiding HTML/CSS for a long time, I finally decided to dive in and create a simple CSS grid website with 3 items in the grid. Everything was working well and looking exactly as I wanted it to: https://i.sstatic.net/zVQ9U.jpg However, I had the ide ...

Creating a three-row CSS layout where the middle row aligns to the right side

I am working on developing a mobile device layout with 3 blocks. The first and third blocks contain text fields, while the second block is filled with a map. However, all of my blocks don't look good when they are too wide. The browser window can have ...

Web Development: Custom Search Form

I am looking to create a website with a form similar to this one, but I'm struggling to figure out how to incorporate all three components into a single form using only HTML and CSS - no javascript. Do you have any suggestions or advice on how to achi ...

Maintaining checked items in their original state while searching for another one in ion-searchbar can be achieved by properly handling

My goal is to maintain the checked items as checked when searching for another item in ion-searchbar. While I have managed to keep the checked items, the checkmark icon does not stay checked. What I aim for is to retain the checked state of all food items ...

Issue with Quantity Box not displaying values in Shopify store

I am currently seeking assistance with resolving an issue I have encountered on a Shopify theme that I recently customized. The problem lies within the quantity box on the live site where despite being able to adjust the quantity using the buttons, the act ...

Tips for obtaining the dynamically loaded HTML content of a webpage

I am currently attempting to extract content from a website. Despite successfully obtaining the HTML of the main page using nodejs, I have encountered a challenge due to dynamic generation of the page. It seems that resources are being requested from exter ...