简体   繁体   中英

how do you add img tags in an unordered list in css right?

I'm trying to create a bulleted list in joomla. temple css

I added the code to the template css file, but the image never appears. What could be the cause of the bug?

 ul li.Selfclean {list-style:url("./images/com_droppics/17/cleanIcon50.png")left top no-repeat;} 
 <li class="Selfclean"> <h3>Title</h3> </li> 

this code I added to the template.

ul li.Selfclean {list-style:url("./images/com_droppics/17/cleanIcon50.png")left top no-repeat;}

thank your for you help )

You used illegal attributes, see https://developer.mozilla.org/en-US/docs/Web/CSS/list-style for available options.

The following example works, except the used logo is too big ;). Also, using h3 inside li makes it move the header to a new line, I'm not sure if that's the effect you wanted to achieve.

 li.Selfclean { list-style: url("https://mirrors.creativecommons.org/presskit/icons/cc.png"); } 
 <li class="Selfclean">Title</li> 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM