Issues encountered while trying to style an unordered list using the table-cell property

I am having trouble formatting the "How it works" section on my website. When the text is too long, the numbers on the left side grow alongside it as shown in number 4.

Is there a way to keep the numbers fixed on the left while allowing the text to expand freely on the right without affecting the numbering? Thank you!

.uli {
    list-style: none;
    float: left;
    width: 100%;
    padding: 0;
}

.uli li {
    padding-bottom: 80px;
    float: left;
    width: 100%;
    position: relative;
}

.uli li span {
    border-radius: 50%;
    border: 1px solid #eaeaea;
    width: 100px;
    height: 100px;
    line-height: 30px;
    margin-right: 10px;
    background-color: #eaeaea;
    display: inline-block;
    position: relative;
    text-align: center;
display: table-cell;
    vertical-align: middle;
color: #fff;
font-size: 3em;
}

.uli li:before {
    content: '';
    position: absolute;
    top: 0;
    width: 2px;
    height: 100%;
    left: 49px;
    background: #eaeaea;
    z-index: -1;
}

.uli li:last-child:before {
    display: none;
}
.uli .ulcontent{
display: table-cell;
    vertical-align: middle;
padding-left: 100px;
}
.entry-content .uli > li{
    list-style-type: none;
}
<ul class="uli">
<li>
<span>1</span>
<div class="ulcontent">
<h3>First Contact</h3>
<p>You can contact me and discuss your idea. If you want, you can do so <a href="#">Here</a></p>
</div>
</li>
<li>
<span>2</span>
<div class="ulcontent">
<h3>Web Consulting</h3>
<p>We will arrange an interview to get to know each other and clarify the project's fundamentals.</p>
</div>
</li>
<li>
<span>3</span>
<div class="ulcontent">
<h3>Web Design</h3>
<p>The creation of a design for your project begins based on its specific needs</p>
</div>
</li>
<li>
<span>4</span>
<div class="ulcontent">
<h3>Development</h3>
<p>Once the final design is approved, we start the development phase, where the theme is programmed entirely from scratch and all web functionalities are added.</p>
</div>
</li>
<li>
<span>5</span>
<div class="ulcontent">
<h3>Implementation</h3>
<p>At this point, the content is added, customized, and transferred to your server so you can manage it yourself.</p>
</div>
</li>
<li>
<span>6</span>
<div class="ulcontent">
<h3>Pre-Consultation</h3>
<p>We will meet via video conference to introduce ourselves and lay down the foundations for what will be your new membership site. Are you ready? Let's go!</p>
</div>
</li>
</ul>

Answer №1

To enhance the appearance of the content, consider applying the following styles to the <span> element located within the <li> element:

display: block;
float: left;
line-height: 100px;

View the updated code on CodePen for reference.

Updated Version

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

Floating Div Elements

Trying to solve this seemingly simple problem has been quite the challenge for me. I have a container with multiple divs added to it, and I want these divs to position themselves freely within any available white space. However, they must follow a pattern ...

"Incorporating input boxes for MySQL updates using PHP, MySQL, and HTML

I'm looking to make my input box dynamic, where it can read the current value from the database and allow users to change that value. Currently, when I enter a number like 1000 into the input box, it posts fine. The PHP results show: Data updated: c ...

Check the File Format (not just the Extension) prior to Uploading

When uploading a file within an HTML form, you can validate the extension using JQuery's Validation plugin: <form enctype="multipart/form-data" id="form-id"> <input type="file" name="file-id" id="file-id" /> </form> To validate ...

The Mobile Side Menu Is Not Scrollable

I've encountered an issue with the side menu on my website. While it works perfectly fine on PC, it refuses to scroll on mobile devices. I've tested it on both my iPhone 5 and iPad, but no luck. Additionally, the toggle button isn't function ...

Issues with Bootstrap Navigation Collapse Utilizing Data Attributes

I'm having trouble getting a Twitter Bootstrap 3 navbar to collapse using data attributes, as it is not expanding properly. Just to give some context, the project I am working on is an ASP.NET C# MVC project that runs on DNN (DotNetNuke) CMS. When I ...

Creating a Click Counter with jQuery 2.0.1/2.0.2: A Step-by-Step Guide

Currently in the process of creating a fundraising webpage for charity, I have chosen to display an animated rabbit making its way Around The World. My progress so far includes a non-looping gif that plays on click, with a limitation on how often it can b ...

How do I create a Bootstrap 4 multi-level navigation bar that drops to the right on the third level?

clickable dropdown hover dropdown.jpg Source: Is there a way to create a dropdown menu that opens to the right like the clickable version, rather than to the left like the hover dropdown in the provided example? I'm open to other solutions as long ...

modify the inherent CSS property

I am working with a component that I have inherited, including its CSS style, and I need to modify one of its properties. Current CSS: .captcha-main-image { width: 100%; height: auto; } <img class ="captcha-main-image" id="captchaImage" src= ...

Upon hovering, icons for each project name are displayed when `mouseenter` event is triggered

My issue lies with the mouseenter function. I am trying to display icons specific to the project name I hover over, but currently, it displays icons for all projects at once. I want each project hovered over to show me its respective icons Below is some c ...

Streaming video to multiple clients concurrently using NodeJS

We are currently facing an issue with serving a video stream. Due to the fact that HTML5 video tag does not support udp to multicast, we have been attempting to repurpose an existing ffmpeg stream and broadcast it to multiple responses. Unfortunately, thi ...

Tips for passing down CSS styles through Less stylesheets

In an effort to create a legend below a <table> that matches the colors defined in Bootstrap stylesheets, I am struggling with the following: .table > thead > tr > td.warning, .table > tbody > tr > td.warning, .table > tfoot ...

Locate an element that is nested within a "concat(" XPATH using Selenium

Embarking on my inaugural project as a Python developer, I am currently in the process of web scraping a retail website. The challenge lies in the fact that the site features infinite scrolling functionality, although at times instead of triggering the inf ...

Is there a way to tally the checked mat-radio-buttons in Angular?

I am seeking a way to determine the number of radio buttons checked in a form so I can save that number and transfer it to a progress bar. <mat-radio-group name="clientID" [(ngModel)]="model.clientID"> <mat-radio-button *ngFor="let n of CONST ...

Assistance required in adjusting the clickable area of the link

While casually exploring a random website, I decided to experiment with some design elements. However, I encountered an issue where the link was only clickable on the left side and not the right. This is how it appears: There is a div containing a heading ...

I can't seem to get my JavaScript to connect to my HTML file. What should I do next?

I'm facing a major issue at the moment. My HTML file doesn't seem to be linking properly with my JavaScript file, even though they are located in the same folder. The script link is correctly placed in the HTML file, but for some reason, it just ...

The linking process in AngularJS is encountering difficulties when trying to interact with

I've already looked at similar questions, and my code seems correct based on the answers provided. It's a very simple beginner code. <html ng-app=""> <head> <title>Assignment</title> <script src=" ...

Any tips on how to personalize the loading animation for single pages using CSS and GIFs?

presentLoading(message) { this.loading = this.loadingCtrl.create({ dismissOnPageChange: false, spinner:'hide', content:`<img class="load" src="assets/dual.gif" />`, }); this.loading.present(); } Hello there! I am working with the ...

The Stylish Choice: Materialize CSS Dropdown Selector

I am currently integrating Materialize CSS into my application and have used media queries to ensure that the layout is responsive. However, I am facing an issue with a select dropdown element. It works fine on laptops but does not allow for selecting any ...

Unexplained vanishing of CSS padding upon form submission

Hey there! I've been working on creating a contact form using PhP, HTML, and CSS. Everything seems to be working fine except for one issue - when I submit the form with incorrect information, the CSS padding disappears. Can anyone help me figure out w ...

Retrieve a specific child element by clicking on a custom control on the map

I have a container element with three child spans. Using JQuery, I can determine which child was clicked when the container is clicked by utilizing the following function: $('.unitContainer').on('click','span',function(){ ...