CSS possibilities
- Started
- Last post
- 3 Responses
- fixate
hey all out there.
I'm wondering if this is possible in CSS
What I aim to do is change the color of every instance of a * symbol in a paragraph.
Is there a way to say with CSS2
p * {
color: red
}so every * in a p tag is red.
I know i could put every * in a span, but was wondering if i could do it a way similar to above.
thanks.
- gabriel_pc0
With just CSS it's not possible, but you could do it fairly easily with javascript and css. Just use javascript to search for * and then put spans around it with the color designation you want.
- versa0
well i guess you already said it, but why not put the *s inside a span or other container and just use a child selector:
p > fooSpanName {css...
i mean it is still really efficient, just not as ideal
i prolly am not helping...
- fixate0
yeah i knew i could run through it with javascript or do child (span) selecting within CSS but i thought maybe they had something like what i ultimately wanted in place.
maybe in CSS3
thanks for the help anyway,