Hey guys, quick question. From css, is there a way to target ONLY text in an li that has an img and text inside of it?

Recommended Answers

<li><img src=... /> This is text</li>

You can style the whole li and then do something different with the img. Or wrap the text in a span tag and style that separately.

Jump to Post

All 3 Replies

Member Avatar
<li><img src=... /> This is text</li>

You can style the whole li and then do something different with the img. Or wrap the text in a span tag and style that separately.

okay cool! thanks guys. it was killing me for a bit.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.