Is there a way to align the ticks to the left of the brief text section in HTML and CSS, as shown in the screenshot?

Click here for a snapshot of ticks
Greetings,
I need some help with aligning blue ticks on the left side instead of above the text as shown in the screenshot.
Below is my code snippet, excluding ionicons v2 font () :)
If more information is required, please don't hesitate to ask.
Thank you!

.section-monthly-donations {
background-color: #434343;
}

.plan-box {
background-color: #696969;
border-radius: 5px;
width: 90%;
margin-left: 5%;
}

.plan-box div {
padding: 15px;
border-bottom: 1px solid #424242;
}

.plan-box div:last-child {
text-align: center;
}

.plan-price {
font-size: 190%;
margin-bottom: 10px;
font-weight: 200;
color: #00BFFE;
}

.plan-price span {
font-size: 70%;
font-weight: 300;
}

.plan-box ul {
list-style: none;
}

.plan-box ul li {
font-size: 70%;
padding: 5px 0;
}


.row {
    zoom: 1; /* For IE 6/7 (trigger hasLayout) */
}

.row:before,
.row:after {
    content:"";
    display:table;
}
.row:after {
    clear:both;
}

/*  GRID COLUMN SETUP   ==================================================================== */

.col {
display: block;
float:left;
margin: 1% 0 1% 1.6%;
}

.col:first-child { margin-left: 0; } /* all browsers except IE6 and lower */


/*  REMOVE MARGINS AS ALL GO FULL WIDTH AT 480 PIXELS */

@media only screen and (max-width: 480px) {
.col { 
/*margin: 1% 0 1% 0%;*/
        margin: 0;
}
}

/*  GRID OF THREE   ============================================================================= */


.span-3-of-3 {
width: 100%; 
}

.span-2-of-3 {
width: 66.13%; 
}

.span-1-of-3 {
width: 32.26%; 
}
<section class="section-monthly-donations">
<div class="row">
<h2>Make a monthly donation commitment</h2>
</div>
<div class="row">
<div class="col span-1-of-3">
<div class="plan-box">
<div>
<h3>Gold</h3>
<p class="plan-price">£200+ <span>monthly path</span></p>
</div>
<div>
<ul>
<li><i class="ion-checkmark-round icon-small"></i>Signed letter from the team</li>
<li><i class="ion-checkmark-round icon-small"></i>Exclusive access to ...</li>
<li><i class="ion-checkmark-round icon-small"></i>Special ...</li>
<li><i class="ion-checkmark-round icon-small"></i>Leo eget bibendum Sed consequat</li>
</ul>
</div>
<div>
<a href="#" class="btn btn-full-light">Make a pledge now</a>
</div>
</div>
</div>
      </div>
<section>

Answer №1

Two methods can be used to include icons in list items.

  1. To incorporate the icon as part of the list item, you can apply display: inline to the <i> element within the <li>. Additionally, you may add margin to adjust the spacing between the icon and content.
  2. If you prefer not to have text wrap around the icon, an alternative approach is to use position: absolute for the icon and position it within a <li> that utilizes position: relative along with padding to create space on the left side for the icon.

See the code snippets below for visual examples:

.section-monthly-donations {
background-color: #434343;
}

.plan-box {
background-color: #696969;
border-radius: 5px;
width: 90%;
margin-left: 5%;
}

.plan-box div {
padding: 15px;
border-bottom: 1px solid #424242;
}

.plan-box div:last-child {
text-align: center;
}

.plan-price {
font-size: 190%;
margin-bottom: 10px;
font-weight: 200;
color: #00BFFE;
}

.plan-price span {
font-size: 70%;
font-weight: 300;
}

.plan-box ul {
list-style: none;
}

.plan-box ul li {
font-size: 70%;
padding: 5px 0;
}

/* Apply new CSS */
.plan-box ul li i {
  display: inline;
  margin-right: 5px;
}
/* End new CSS */

.row {
    zoom: 1; /* Trigger hasLayout for IE 6/7 */
}

.row:before,
.row:after {
    content:"";
    display:table;
}
.row:after {
    clear:both;
}

/* GRID COLUMN SETUP */

.col {
display: block;
float:left;
margin: 1% 0 1% 1.6%;
}

.col:first-child { margin-left: 0; } /* Exclude IE6 and lower */

/* REMOVE MARGINS FOR FULL WIDTH AT 480 PIXELS */

@media only screen and (max-width: 480px) {
.col { 
        margin: 0;
}
}

/* GRID OF THREE */

.span-3-of-3 {
width: 100%; 
}

.span-2-of-3 {
width: 66.13%; 
}

.span-1-of-3 {
width: 32.26%; 
}
<link href="http://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css" rel="stylesheet"/>
<section class="section-monthly-donations">
<div class="row">
<h2>Pledge a monthly donation</h2>
</div>
<div class="row">
<div class="col span-1-of-3">
<div class="plan-box">
<div>
<h3>Gold</h3>
<p class="plan-price">£200+ <span>per month</span></p>
</div>
<div>
<ul>
<li><i class="ion-checkmark-round icon-small"></i>Executive letter signed by the team</li>
<li><i class="ion-checkmark-round icon-small"></i>Exclusive access to ...</li>
<li><i class="ion-checkmark-round icon-small"></i>Exclusive ...</li>
<li><i class="ion-checkmark-round icon-small"></i>Sed consequat, leo eget bibendum</li>
</ul>
</div>
<div>
<a href="#" class="btn btn-full-light">Pledge now</a>
</div>
</div>
</div>
      </div>
<section>

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

Quiz timer using JavaScript

In my HTML and JavaScript project, I am creating a quiz game where players have 15 seconds to answer each question. To implement this timer feature, I used the following code snippet: <body onload="setTimeout(Timer,15000)"> Implemented in JavaScrip ...

Tips for making a rounded text box

How can I design a circular textarea where the text conforms to the shape? Here is my attempt, but I'm unsure how to keep the text inside the circle without relying on javascript. ...

Is it possible to use jQuery to append an image in bold text on a webpage

I've been trying to implement this code but it's not functioning properly. Can someone please point out where I might be making a mistake? $('#ramka').append("<b><img src="cat.png"></img></b>"); ...

The dynamic suggestion list implemented with <ul><li> is functioning perfectly across all desktop browsers, but is encountering issues on iPhones and other mobile devices

The dynamic suggestion list I've implemented using ul & li tags is functioning well, with the exception of iPhone mobile devices. While the suggestion list displays correctly, option selection does not work on iPhones. This is the code for inspe ...

When adjusting to mobile dimensions, the responsive website design struggles to center the navbar properly

I am currently developing my senior year portfolio website and I am struggling to center the navbar (Work About Contact) when it is in mobile mode. My goal is for it to be positioned directly below the logo, perfectly centered, but so far nothing I have tr ...

Resizing Checkboxes in Internet Explorer 9

IE9 is causing checkboxes to render stretched, while all other browsers maintain the size of the checkbox but expand a clickable invisible area. Is it possible to disable this behavior in IE9 using CSS without affecting the behavior of other browsers (inv ...

Vue.JS is unable to parse JSON data

Recently, I decided to experiment with Vue JS and started working on a new page. One of the features I wanted to include was a button that would trigger a chat module to pop up. Here's the current code snippet I have: <!DOCTYPE html> <html l ...

Flask application encountering issue with POST method - Error 404 detected

I'm in the process of developing a straightforward Flask application to run a web app that connects to a Postgres database. However, I'm encountering an issue where the POST method doesn't seem to function correctly when I click the submit ...

Uncover a section of text from HTML using the Beautiful Soup module

I have an HTML snippet like this: <span id="lbldiv" class="lbl" style="color:Blue;"> Division : First; Grand Total: 3861; Grand Max Total: 4600 </span> By using the get_text method on the span element, I can extract the text: Division : ...

Generating a partially translucent image overlay

I am currently working on a one-page WordPress theme. Each section of the page includes a header with an image and an overlay. The header consists of a background image, with a wrap-width image inside. Below that, there is a semi-transparent png image tha ...

CSS Menu Troubleshooting: Potential Conflict Causing Issues?

I've done everything I can think of and still the dropdown is cutting off. Can you please take a look at my code and see what's causing this issue? Here's the link to the website: Any help would be greatly appreciated. ...

The Selenium python tool is reporting that the element at coordinates (X, Y) is not clickable, as another element is blocking it from receiving the click. It's important to note that

Here is a link to an online store that I need to extract information from. Specifically, I am looking to access the Most Helpful, positive, negative, most recent, and certified buyers' sections in order to scrape the values within them. Unfortunately, ...

A step-by-step guide on including a php file with jquery

I've already clicked on this link, How to include PHP file using jQuery? However, when I try it in my code, it's not working. What could be the issue? index file <div id="content">Hi</div> <script type="text/javascript"> va ...

The seamless transformation from HTML table to angular material table (mat-table)

I am a beginner in Angular Material and I am attempting to transition a basic Angular table into an Angular material table using mat-table Uncertain of where to start, how can I convert the following table into mat-table? This is my .html file that conta ...

"Learn the process of integrating a delete button into your PHP form for the purpose of removing rows from your MYSQL database

Hello, I am embarking on my journey with PHP coding and encountering some challenges. Specifically, I am trying to incorporate a delete button for each row in my code, but unfortunately, it doesn't seem to be functioning as expected. Below is the sn ...

Access a webpage in an html document using URL variables

In the process of developing an MVC web app without utilizing any MVC framework, I have created an index.html file with a section that dynamically loads all the views as needed by the user. However, I encountered an issue where direct URLs such as www.foo. ...

Tips on creating an editable table row in Angular to easily update values

I'm currently developing an Angular application which is meant to extract data from an excel sheet and exhibit it in a table upon upload. I have incorporated an edit link beneath one column for the purpose of editing the row data; once you click on ed ...

PHP function that allows toggling only the first item in an accordion

In my function.php file in WordPress, I have the following code that is called using a shortcode on certain pages. It loops through and displays FAQs stored with each post. However, I am facing an issue where only the first accordion item can be toggled, ...

Ensure that the pseudo element remains positioned between the background and main content

I am currently creating buttons using the anchor tag. However, I am facing issues with the desired effect not working as expected. The pseudo-element is overlapping the button and the text is getting hidden. My goal is to have the pseudo-element positioned ...

Enhance the usability of input-group-addon elements in Bootstrap by incorporating focus and validation states, rather than focusing

When using Bootstrap, focusing on an input activates a blue border and box shadow to show where the user's attention is. If there are validation states such as error, warning, or success, a red, yellow, or green border will be added accordingly. An ...