OZONE Asylum
Forums
XML - XSL - XSLT - XHTML - CSS - DOM
CSS to change text color
This page's ID:
27249
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
The question was akwardly phrased, but you can still use pseudoclasses (events, like :hover) and pseudoelements (DOM extensions, like first-letter) together, tmk, just not on the same element. The question was whether you could change the color of text within an element -- the only way to achieve this ([i]without changing the markup[/i]) are those pseudoelements. div.somebox > p:first-line { color: #f00; font: 1.6em/2em; } div.somebox:hover > p:first-line { color: inherit; } Though abstract cases like this aren't very helpful; reading the spec (above) should impart a better understanding. Keeping in mind that IE does everything possible to break straight-css. CSS 2.1 did make some improvements, but expect them widely supported in 2012. Cheers, DC
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »