I'm trying to create a list that checks the html for an icon file using attr
li .school-list {
position: relative;
display:block;
}
.school-list::before {
content: attr(icon string,"hello");
display:block;
background-repeat: no-repeat;
background-size: cover;
width: 10px;
height:10px;
position: absolute;
top: 50%;
transform: translateY(-50%);
}
Currently I'm just trying to get the value to display in the content but if I use "string" as the value type it fails 100% of the time. What exactly am I doing wrong?
Here is the HTML I'm using right now
<li icon='helloooo' class='school-list'><a href="https://www.sdbor.edu/administrative-offices/human-resources/Pages/default.aspx">Board of Regents-Pierre/Sioux Falls/ThisTestSpot</a></li>
<li icon='helloooo' class='school-list'><a href="http://www.bhsu.edu/FacultyStaff/HumanResources/tabid/867/Default.aspx">Black Hills State University-Spearfish</a></li>
<li icon='helloooo' class='school-list'><a href="http://dsu.edu/jobs">Dakota State University-Madison</a></li>
<li icon='helloooo' class='school-list'><a href="http://northern.edu/about/departments-and-offices/human-resources">Northern State University-Aberdeen</a></li>
<li icon='helloooo' class='school-list'><a href="http://www.sdsmt.edu/Campus-Services/Human-Resources/">South Dakota School of Mines & Technology-Rapid City</a></li>
<li icon='helloooo' class='school-list'><a href="https://www.sdstate.edu/human-resources">South Dakota State University-Brookings</a></li>
<li icon='helloooo' class='school-list'><a href="http://www.usd.edu/hr/">University of South Dakota-Vermillion</a></li>