-
css text can it be done
Hi. Is there a css tag I can use that would make a certain character a certain color on my page.Even in tables.
For example say I wanted the letter "A" to be red everywhere on the page.
Can css do this.
Thanks
-
Retired Mod
No, you would have to wrap every instance of 'A' with span tags and apply a CSS color property to that. CSS can only be applied to elements, to identify characters on the page you need a containing element.
CSS 3 might be able to help you with advanced selectors but it wouldn't work in the majority of browsers. You could also do this with some javascript.
CSS would be something like:
Code:
p span {
color: red;
}
<p>This is <span>a</span>n ex<span>a</span>mple of <span>a</span>dding sp<span>a</span>n t<span>a</span>gs to the p<span>a</span>ge to m<span>a</span>ke 'A's red</p>
If you used spans inside a paragraph in other instances then you could use a class.
I'm not sure what you mean by 'CSS tags' but just to be clear there are no CSS tags, CSS is applied to HTML tags.
-
Thanks aversion.That seems to be o.k. To tell you the truth I don't know what I meant by "CSS tags" either. Probably has something to do with my very limited knowledge of CSS Lol.
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|