chris77 — 2013-08-12T23:37:45-04:00 — #1
Is there a way to use CSS to color a specific character whereever it appears without doing anything in HTML to prompt the coloring (w/o span)?
ralphm — 2013-08-12T23:54:36-04:00 — #2
No, not without some kind of styling hook like a span. You can do it with JS, though.
dresden_phoenix — 2013-08-13T00:05:16-04:00 — #3
I am sorry to say , no. CSS styles elements and individual characters aren't elements; they are one could say a 'property' of an element.
Besides, it really doesnt go with what CSS does. If all the letter Es are supposed to be red for some reason.. then that reason should be reflected in the markup. Otherwise that what Span is there for, specifically.. to HOOK CSS
Keep in mind tho , tho you aren't necessarily restricted to using SPAN. There are other presentational elements still around, such and I and B, which you could use to exclusively wrap a charter.
chris77 — 2013-08-13T11:01:49-04:00 — #4
I'll have to modify that wish and do it just for the first quote in a page and use span or others.
I have a php file that directs all the html files. Is there a way to do it in php?
ralphm — 2013-08-13T18:25:48-04:00 — #5
Depends on what you want to do in PHP. The question is not very specific. But ultimately the styling will be handled by CSS in some fashion, because the PHP is gone by the time the page gets to the browser.