I have to select particular word in div tag.
HTML
<div>This is my text</div>
Here i need a select the word my
.
Is it possible to achieve with CSS alone?
I have to select particular word in div tag.
HTML
<div>This is my text</div>
Here i need a select the word my
.
Is it possible to achieve with CSS alone?
HTML:
<div> This is <span id="myspan"> my </span> text </div>
CSS:
#myspan {
ENTER CSS HERE
}
there's no other chance (unless you change the span to any other tag)
No, you can't select inner text via css... You should use some javascript code or add a class to the specific text container.
Check jquery :contains selector, for example: http://api.jquery.com/contains-selector/