467,072 Members | 1,250 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,072 developers. It's quick & easy.

replace text except when mouse hovers above it

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
  • viewed: 1944
Share:
1 Reply
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.

Similar topics

6 posts views Thread by killerkatt@hotmail.com | last post: by
1 post views Thread by michael | last post: by
2 posts views Thread by charlie_M | last post: by
7 posts views Thread by misscrf | last post: by
3 posts views Thread by Mr.Tickle | last post: by
3 posts views Thread by matthew.newsome@npower.com | last post: by
14 posts views Thread by > Adrian | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.