17.9.2011 19:18, Tim Streater wrote:
> I think you didn't read what I wrote.
I did. But I didn't read your mind clearly enough (just the general
picture, not the specifics), and I only commented on what you wrote, not
what I extracted via ESP.
> The arbitrary html, having
> arrived, is stored locally. For later display, it is then massaged by a
> PHP script before being handed to a browser.
So this is far from doing things in CSS only.
> This is not a website,
> hence no URL. It's an *application*.
Too bad. If you want others to help you, you need to give them access to
the application one way or another.
> So obviously the PHP script has to:
>
> a) add the <span> somewhere before the </a> and the class just before
> the end of the <a>.
Does it? Why are you doing this? If you are about to do something with
_all_ <a> elements, like adding some content from its attributes as
visible somewhere, then natural approach, now in the 2010s, would really
be a CSS-only approach, using generated content. But you haven't
disclosed anything about the usage environment, so it's impossible to
say whether using
:link:after, :visited:after { content: attr(href) ... }
- with suitable styling added of course - would be feasible.
> Obviously before modifying my app to provide this new feature, I created
> a small test, to see how it might work and adjusted the CSS until it
> looked good to me.
So where did it go wrong?
> Here is my test, which illustrates the problem. You can copy/paste it to
> a file on your desktop and then double-click it.
You didn't bother helping to help you by providing an online URL.
> Here, both
> the link and the tip are underlined in blue.
The link is. The tip is not. Of course it can be somewhat difficult to
distinguish blue underlining from a black background, but astonishgly, I
was able to modify the background color suitably.
(You didn't tell which browsers in which environments you tested.)
--
Yucca,
http://www.cs.tut.fi/~jkorpela/