the list item choices are not showing up as they should

Hey there! I could really use some assistance with a couple of issues I'm facing.

I'm trying to display list-items on my website, but two problems keep popping up:

  1. I'd like to replace the normal bullet points with a V image

  2. The list items are supposed to be displayed in 3 columns, but the first item in the first column is slightly shifted down.

Here's a snippet of my HTML code:

<div id="box2" class="features">
  <ul>
    <li>Smoking Policy</li>
    <li>Business Center</li>
    <li>Doctor</li>
    <li>Free Wifi</li>
    <li>Pets Allowed</li>
  </ul>
</div>

.features{
position:relative;
float:left;
width: 90%;
height: auto;
margin: 1% 0 0 2%;
border-radius:5px;
padding: 0% 1% 0% 1%;
font-size: 12px;
border: solid 1px #D41717;
-webkit-column-count: 3;
   -moz-column-count: 3;
        column-count: 3;}

.features ul img{width: inherit;}
.features ul li{list-style-image: url('images/v-list.png');}
.features li {
display: block;
padding-bottom: 10px;
}

You can view an example picture here.

Your help would mean a lot!

Thanks, Jon

Answer №1

The issue may be arising from the display: block property in your stylesheet, and the list-style-image should be applied to the ul element rather than the ul > li elements. You can view an example in this jsbin link: list-style-image

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 ReactJS and JavaScript to transform an array into a fresh array

I am working with an array that looks like this: var oldArray = [ {number: '12345', alphabet: 'abcde'}, {number: '54321', alphabet: 'abcde'}, {number: '67891', alphabet: 'abcde'}, ...

Horizontal Scrolling Menu for Dynamic Page Navigation

My goal was to create a smooth-scrolling one-page website that scrolls horizontally. One feature I wanted was a menu that smoothly slides into view whenever a new page is in focus along with the horizontal scrolling. I found an example of a scrolling scr ...

The collapsible menu located beneath my navigation bar is unable to reach the correct position on the right side

I'm attempting to create a collapsible navigation bar with its contents shifting to the right side when resized to medium size, but I'm having trouble. Can someone please assist me with this? I have also included the code below. <nav class=&qu ...

Ways to establish a default search outcome in a search box

Looking to create a search bar with JavaScript and JSON to display default search results for visitors. Currently, the search bar only shows results after text is removed. How can I show predefined search results when the page is loaded? const search = ...

Reacting like sticky bottoms and tops

I'm working on a react/tailwind project that involves a component I want to be fixed at both the top and bottom of the screen. In simpler terms, there's an element that I need to always stay visible even when the user scrolls up or down the page ...

What is preventing me from adding a borderRadius to this particular React bootstrap tab?

I have been working on tabbed content and encountered an issue with applying border radius. Despite adding style={{borderRadius: "10px"}}, it seems to have no effect. This styling works perfectly everywhere else in my project, so I am puzzled as ...

Is there a way to retrieve the previous value in an input field's onChange event?

I am working with inputs in a React project and have assigned a function to their onChange event. While I have been able to access the current value, I am now looking for a way to retrieve the previous value as well. The reason I need the old value is bec ...

over line up text align on the baseline with hr

I'm looking to make sure the text is positioned just above the hr tag, similar to how the logout button appears with bootstrap. This is the desired outcome: https://i.sstatic.net/gIl1b.png Here's the code I have using bootstrap : <di ...

Adjust the span's width to make it shift position

Currently, I am in the process of learning HTML and there is a specific question that has come up for me. Within my <div class="input-group">, there are three elements: one span, one input field, and another span: <span class="input-group-addon q ...

versatile grid tiles with CSS flexibility

Trying to remove the svg elements while keeping the grid layout intact. The svgs are used to maintain a 1:1 aspect ratio for all tiles. UPDATE: Discovered a CSS Solution for this. Simply set aspect-ratio: 1 for the tiles. Is there an alternative soluti ...

Challenge in altering text color upon hovering over it

I'm attempting to change the text color to white upon hovering, but I haven't had any success so far. Here's the code snippet that I've used. How can I ensure that the text color changes to white and also its size increases when hover ...

When is the appropriate time to utilize the style attribute in CSS?

Hey there, I'm in the process of building a website from scratch and I've hit a snag. I understand that using the style tag isn't ideal, but would it be acceptable in this scenario? Is there a more efficient approach? Let's consider t ...

Adjust the size of a SVG group by hovering over a separate HTML element

I need some help with implementing a scale effect on group elements within an SVG. The goal is to have the group element scale up when hovering over a list item, but I am running into issues with the positioning because of the translate property. Does any ...

Importing a CSS file into your Angular project's index.html file

I am currently facing a challenge while trying to utilize the angular2-busy library within an Angular project that was generated using the CLI. The issue arises when attempting to import the stylesheet: <link rel="stylesheet" href="/node ...

HTML elements within the parent are seemingly enlarged compared to the parent element

I'm currently working on a project for an angular 2 recipe application, and I've encountered an issue with one of my HTML elements. The list items within the unordered list (which contain checkboxes) appear to be larger than the parent UL element ...

Efficiently loading Angular views with lazy loading techniques

I am currently working on a calculator website powered by Angular. This single-page site is fully responsive and divided into 7 sections, each featuring different calculators based on user preferences. To improve loading time, I am interested in implementi ...

"Explaining like you're five: How to use a new npm

When working with static, fully custom websites, I often face confusion on how to include packages. For instance: I understand creating the package.json file. I know how to install and --save the package into the package.json file. But what comes next? ...

Eliminate unnecessary HTML elements in Angular

I am currently using ngSwitchCase for 3 different cases, and I have noticed that I am duplicating the same code inside each case. Is there a way to eliminate this redundancy? The redundant code is located within the "app-device" component <div *ngS ...

Tips for preventing divs from sliding to the next row when adding margin in Bootstrap

{% for plant in plants %} {% if forloop.counter0|divisibleby:3 %} <div class="row row-cols-3"> {% endif %} {% include 'included/_plant_cell.html' %} {% if forloop.counter|divisibleby:3 %} </div&g ...

Refresh numerous pages

Currently, I'm working on a freelance project where I've been tasked with re-coding an outdated menu for my client. The website is built on static pages, so updating the menu manually on each page seems like a time-consuming and repetitive task. ...