سؤال

HTML snippet:

<li class = "li_image"></li>

CSS snippet:

li_img {
    width:28px;
    height:32px;
    background:url(https://ssl.gstatic.com/gb/images/v1_90902864.png) 10 15;
}

Any idea why this doesn't work? This list item is not even appearing in the list.

هل كانت مفيدة؟

المحلول

You're missing the dot before the class. Also, what are you trying to aim with the "10" and "15"? If you're trying to set width and height, state those inside of the class instead, just like you did.

It should be:

.li_img {
    width:28px;
    height:32px;
    background:url(https://ssl.gstatic.com/gb/images/v1_90902864.png);
}

نصائح أخرى

turns out there was a mismatch between my class name and call. (li_image vs. li_img) . Whoops.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top