By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,723 Members | 1,662 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,723 IT Pros & Developers. It's quick & easy.

replace text except when mouse hovers above it

P: n/a
I'd like to replace the text content of a subdiv by "...", except when
the mouse is hovering either above it, or above another subdiv of the
same parent. Something like:

<div class="parent">
<span class="name"><a href="#">Name</a></span>:
<span class="message">This is the text</span>
</div>

div.parent span.message { display: none }
div.parent:after { content: "..." }

But then? Ideally I'd like the original message to become visible if the
mouse hovers over the three dots, but I don't think that's possible...
I'd settle for making it visible if it hovers over the name.

I can't make either of these work.

Help?

And, is it possible to select a div if you hover over a child element?
That would be a way around it.

--
Bart.
Mar 14 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Bart Lateur a écrit :
I'd like to replace the text content of a subdiv by "...", except when
the mouse is hovering either above it, or above another subdiv of the
same parent. Something like:

<div class="parent">
<span class="name"><a href="#">Name</a></span>:
<span class="message">This is the text</span>
</div>

div.parent span.message { display: none }
div.parent:after { content: "..." }

But then?
Not too bad for a start. How about http://yo.dan.free.fr/tmp/bart.html ?
Not exactly pretty, but close to what you describe (in web browsers and
IE7, probably).
But then, what do you *really* want to achieve? Please provide an URL
with an excerpt of real content, not just "this is the text".
[...]
And, is it possible to select a div if you hover over a child element?
That would be a way around it.
To /select/ a div? Again, what do you want to do? (the big picture)

--
Daniel Déchelotte
http://yo.dan.free.fr/
Mar 16 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.