473,809 Members | 2,757 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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:afte r { 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
1 2254
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:afte r { 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
10070
by: killerkatt | last post by:
I am new to CSS and would like to know if there is a way to make this happen with CSS: image1 and image 2 are laid out at the top of the page. when the mouse hovers over image1, a paragragh or so of formatted text appears below, when the mouse leaves the image, the text disappears; when the mouse hovers over image2, a different body of text appears in
1
11093
by: michael | last post by:
What methods (eg. CSS/Javascript) are there to dynamically replace text other than dynamically changing form text field values? I don't mean color styles and fonts etc., but actual text content itself. Any one has pointers to example pages/tutorials?
2
2691
by: charlie_M | last post by:
I have the following code: <script type=text/javascript> function hide_tooltip(){ var hp = document.getElementById("tooltipper"); hp.style.left=0; hp.style.top=0; hp.style.width=1; hp.style.height=1; hp.style.padding=0;
7
9361
by: misscrf | last post by:
I tried to put some text into the controltip text of the properties of a command button. I tested it out and nothing happened. I have the status bar text, but I want the text tip that hovers when I mouse over. I looked all over and found stuff on putting it in code. Not what I wanted, because I thought you could just put it in the controltip text property. I tried it out anyway and that doesn't do anything either. I put this code on a...
3
2278
by: Mr.Tickle | last post by:
How can I get the tooltip in a generic way for any control that the mouse is hovering over in a single application, I dont want to have to code the MouseHover event handler on every form.
4
1409
by: Just Me | last post by:
I want to make a small window popup when the mouse hovers. I've looked in the Help but can't find any info (probably can't think of a good keyword) Are ToolTips control used for that? Any suggestions? Thanks
0
1377
by: Lucky | last post by:
hi guys, i'm looking for a soultion that helps me to show the subitem text of the listview control in the tooltip when the mouse pointer hovers on the subitem. i've found on solution, according to it i have to catch the listviewItem and than itarate through all the subitem and find out which item has the mouse pointer. but the problem for this solution is, what if there are lots of columns in the listview and what if the user is hovering...
3
6801
by: matthew.newsome | last post by:
I have a label on a form that a user clicks on to enter another form, is there anyway of changing the colour of the label or the mouse pointer when a user clicks/hovers over the label.
14
13422
by: > Adrian | last post by:
Is there a way of stopping text from highlighting in textbox? Many thanks, Adrian.
0
9721
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10378
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9198
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5687
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4332
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3013
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.