Creating a vertical line at the bottom using CSS

Is it possible to add a centered line to the bottom of the "numberCircle" in a responsive table created with twitter-bootstrap? I would like it to look like this image:

https://i.sstatic.net/WKgFu.jpg

Thank you

.numberCircle {
  border-radius: 50%;
  width: 50px;
  height: 50px;
  background: rgba(177, 207, 219, 1);
  color: white;
  text-align: center;
  line-height: 50px;
  font-weight: 600;
  font-size: 16px;
  margin: 10px 0;
}
<table class="col-md-12 table-condensed cf">
  <tbody>
    <tr>
      <td style="width: 50%; vertical-align: top;">
        <div class="title">Title Content</div>
        <div class="content">
          Quisque porta pulvinar urna, at maximus sapien efficitur ac. Suspendisse tristique blandit tortor eget congue. Nulla sed aliquet enim. Ut quis massa auctor, feugiat dui ut, molestie mi. Ut congue metus ac neque vestibulum, et pharetra neque mattis. Suspendisse
          sed purus commodo, sagittis justo non, pretium diam.
        </div>
      </td>
      <td class="text-center" style="width: 50%; vertical-align: top;">
        <div class="numberCircle">1</div>
      </td>
    </tr>
  </tbody>
</table>

Answer №1

You can utilize the :after pseudo element to achieve this effect:

.numberCircle {
  border-radius: 50%;
  width: 50px;
  height: 50px;
  background: rgba(177, 207, 219, 1);
  color: white;
  text-align: center;
  line-height: 50px;
  font-weight: 600;
  font-size: 16px;
  margin: 10px 0;
  position: relative;
}
.numberCircle:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  height: 50px;
  width: 5px;
  background: red;
  transform: translate(-50%, 100%);
}
<table class="col-md-12 table-condensed cf">
  <tbody>
    <tr>
      <td style="width: 50%; vertical-align: middle;">
        <div class="title">Title Content</div>
        <div class="content">
          Quisque porta pulvinar urna, at maximus sapien efficitur ac. Suspendisse tristique blandit tortor eget congue. Nulla sed aliquet enim. Ut quis massa auctor, feugiat dui ut, molestie mi. Ut congue metus ac neque vestibulum, et pharetra neque mattis. Suspendisse
          sed purus commodo, sagittis justo non, pretium diam.
        </div>
      </td>
      <td class="text-center" style="width: 50%; vertical-align: middle;">
        <div class="numberCircle">1</div>
      </td>
    </tr>
  </tbody>
</table>

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

What is the method for creating a clickable link using only HTML5 and CSS3 on a div?

Throughout the ages, this question has persisted, with answers that have stood the test of time. I've explored various solutions, yet none have met my expectations. I aim to create a fully clickable link for div .content1 without relying on text or ...

Is there a method to incorporate a scroll event into the ng-multi-selectdropdown, a npm package?

Query: I need to incorporate a scroll event in the given html code that triggers when the div is scrolled. However, I am facing issues with implementing a scroll event that works when the elements are being scrolled. <ng-mult ...

Trouble with Alignment in Bootstrap 3 Form

I'm currently facing an issue with aligning a form group in Bootstrap 3. My goal is to have them aligned vertically, but I am struggling to achieve this. Any help would be greatly appreciated! Please refer to the screenshot below for reference: Her ...

How can we style the <a> link once it has been downloaded?

Is there a way to change the color of a download link after it has been clicked on? I've attempted using the visited attribute, but it only seems to work with regular links and not with download documents: Appreciate any help ...

Creating background color animations with Jquery hover

<div class="post_each"> <h1 class="post_title">Single Room Apartments</h1> <img class="thumb" src="1.jpg"/> <img class="thumb" src="1.jpg"/> <img class="thumb" src="1.jpg"/> <img class="thumb last" ...

Retrieve the value from an input field when the value is returned from JavaScript

Scenario: I'm currently working on creating a QR reader to retrieve a specific value. You can check out the progress here: What's functioning: scanning. When I scan a QR code, a value is displayed in the text box. Here's the code snippet b ...

I am trying to connect HTML input with Python but I am not sure how to do it

As part of our capstone course team project, we are developing a self-hosted calendar app specifically designed for college students. One of our team members has taken the initiative to create HTML webpages for this self-hosted server. My current task is t ...

In CSS, the primary consideration is consistently maintaining a uniform height for the main section

In the process of developing our website, we have a main section (div main and mainholder) with a maximum height set at 770px. Whenever the content in this section exceeds that height, it gets cut off on the page. However, we want the height of this sect ...

Struggling to align images side by side using HTML and CSS along with figcaption and buttons

Adding buttons below images on my webpage is proving to be a bit challenging. I tried using the figcaption tag, but it resulted in the images stacking on top of each other instead of side by side. **My HTML:** <section class="mostpurch"> ...

Choose a sibling element using CSS styling

As I'm developing an AngularJS component, I am on the quest to identify ANY sibling of a particular tag, irrespective of whether they are div, span, or p. I'm hoping for a CSS-native solution that resembles something along the lines of div:siblin ...

Using a Node.js module to shrink HTML files

Is there a way to minify HTML before rendering it? I'm aware of console minifiers like: html-minifier However, I am looking for a solution that can be implemented in the code itself. Something along the lines of: var minifier = require('some- ...

HTML forms default values preset

I need help with pre-setting the values of a dropdown menu and text box in an HTML form for my iPhone app. When the user taps a button, it opens a webview and I want to preset the dropdown menu and text field. Can someone guide me on how to achieve this? ...

Is there a way to turn off step navigation in bootstrap?

Displayed below is a visual representation of the bootstrap step navigation component. Presently, there is an unseen 'next' button located at the bottom of the page. When this 'next' button is pressed, it transitions from 'step-1 ...

Is the textarea functioning properly with the inclusion of mysterious character variables?

As per the documentation When using an unknown named character reference like &this, it results in an ambiguous ampersand error. This situation is confusing <textarea> &this </textarea> What am I misunderstanding here? Any re ...

What is the best way to adjust the height of a dropdown box in an angular application?

Is there a way to change the height of the scroll view? It seems too long for my liking, any advice? I attempted to adjust it using css but unfortunately, it didn't work out. The scroll view appears excessively lengthy as shown in the image below. h ...

Tips on attaching a suffix icon to a material-ui-pickers input box

Here is a snippet of my code: <Box p={6}> <Grid container spacing={2}> <Grid item xs={6}> <TimePicker autoOk label={t('checkIn')} value={time1} onChange={handlecheckIn} clearable /> </Grid> < ...

Update the displayed number on the input field as a German-formatted value whenever there is a change in the input, all while maintaining

In German decimal numbers, a decimal comma is used. When formatting, periods are also used for grouping digits. For example, the number 10000.45 would be formatted as 10.000,45. I am looking to create an input field (numeric or text) where users can input ...

Issue with accessing $index.$parent in function parameter within ng-repeat in AngularJS

Can anyone with more experience please explain to me why this particular code compiles successfully: <li class="btn dropdown top-stack breadcrumb-btn" ng-repeat="nodeName in selectedNodeNames"> <a class="dropdown-toggle btn-anchor"> ...

The :root selector has encountered a malfunction within the Angular component

I'm interested in experimenting with CSS variables in my Angular 11 component. <div class="main-content"> <a>Test Link</a> </div> Here is my app.component.css: div.main-content{ --main-color: red } a{ color: v ...

Issue with iPhone CSS displaying differently on mobile devices

The CSS design does not display correctly on iPhone devices in real-life testing, even though it appears fine on browsers with mobile view emulators. Interestingly, the design also looks great on Android phones but encounters issues specifically on iPhones ...