I'm working on a list where SVGs are loaded as list items. How can I adjust the height and width of the ::before
pseudo-element to be 30px x 30px? Setting the height and width directly didn't work for me. Can someone assist with this?
<div class="list-div">
<ul class="items-list">
<li>This is item A</li>
<li>This is item B</li>
<li>This is item C</li>
<li>This is item D</li>
</ul>
</div>
and the CSS :
.list-div li {
opacity:0;
position: relative;
display: block;
margin-bottom: 5px;
padding: 10px;
text-align: left;
visibility: hidden;
text-transform: uppercase;
}
.list-div li:nth-child(1){
background: url(some_image.svg);
list-style-type: none;
margin: 0;
padding: 10px 10px 10px 48px;
vertical-align: middle;
background-repeat: no-repeat;
background-position-y: 50%;
}
.list-div li:nth-child(2),
.list-div li:nth-child(3),
.list-div li:nth-child(4){
background: url(some_image.svg);
list-style-type: none;
margin: 0;
padding: 10px 10px 10px 48px;
vertical-align: middle;
background-repeat: no-repeat;
background-position-y: 50%;
}