List-style-image not shown for li

2690 views html
-3

I am currently playing arround with customizing lists in HTML and CSS, so I tried to use custom images to be used for the li 'dot'. However, it is not shown. Could someone tell me whats wrong with this code snippet?

body {
  margin:0;
}
.container {
  display:flex;
  flex-wrap:wrap;    
  flex-direction:row;    
  height:100vh;
  background-color: white;
}
.container > div {
  min-height: 100vh;
  border: 1px solid black;
  box-sizing:border-box;
  background-color: inherit;
}

container > div .content{
  height: 100vh;
  width: 100vw;
  background-color: inherit;
}
.full-width {
  width:100%;              
}
.half-width {
  width:50%;
}

.half-width > .half-width-content{
  position: relative;
  margin-top: 0;
  height: 100%;
  width: 100%;
}

list-div {
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.list-div ul {
  padding: 0;
  width: 75%;

}

.list-div li {
  position: relative;
  margin-bottom: 5px;
  padding: 10px;
  text-align: left;
  visibility: visible;
  text-transform: uppercase;
}

.list-div li:nth-child(1){
  list-style-image: url('https://fakeimg.pl/30x30/?text=A');
  list-style-position: outside;
}
 <div class="container">
<div class="half-width">
    <div class="half-width-content">
      <div class="list-div">
        <ul class="items-list" id="list">
          <li>List item A</li>
          <li>List item B</li>
          <li>List item C</li>
          <li>List item D</li>
        </ul>
      </div>
    </div>
	</div>
  </div>
</div>

answered question

1 Answer

Have an answer?

JD

Please login first before posting an answer.