Touchscreen tooltip
guilou339
Posted messages
2
Registration date
Status
Member
Last intervention
-
DoctorHow -
DoctorHow -
Bonjour,
I use tooltip in HTML to display information on non-clickable text in a table.
Today, I need to show this tooltip on touch screens, but since there is no mouse, the tooltip does not appear.
For your information, this is not for a website; it is for a table in OBIEE, but we can use HTML for data formatting.
Example code for a cell:
How can I make this tooltip display on touch screens, without PHP?
For example, in the above image, when I hover over the 270 in red, it shows its tooltip.
Thank you in advance.
Configuration: Windows / Firefox 99.0
I use tooltip in HTML to display information on non-clickable text in a table.
Today, I need to show this tooltip on touch screens, but since there is no mouse, the tooltip does not appear.
For your information, this is not for a website; it is for a table in OBIEE, but we can use HTML for data formatting.
Example code for a cell:
<B><FONT COLOR="red"; title="Fin : 94">270</FONT></B>
How can I make this tooltip display on touch screens, without PHP?
For example, in the above image, when I hover over the 270 in red, it shows its tooltip.
Thank you in advance.
Configuration: Windows / Firefox 99.0
1 answer
-
Hello,
let's see if you can integrate some CSS for this (or even XSL by switching to XML which would make more sense in this context):
https://duckduckgo.com/?q=tooltip+CSS
Note that the hover for the tooltip does not change in CSS (:hover) whether the hover is by mouse or touchpad or on a touchscreen, as it is the cursor hover and not the interface used to direct the cursor.
The behavior you have is fundamentally based on a mistake of the programs (the hover is not supposed to display text unless we want it and implicitly request it), an error (dating back 20 years and has had its corrections since) that has been used out of convenience but of course using something incorrect is not something reliable and well done as you can see.
As for PHP, it has nothing to do with this, you are probably talking more about JavaScript which can detect and differentiate between a mouse and a touchscreen. But there's no need to go that far; CSS addresses this without needing to resort to programming by using the hover cursor (or rather its detection on hover).
https://www.w3schools.com/cssref/sel_hover.asp
You can, of course, start with a search: learn CSS
If you cannot use CSS, then there is simply no solution to your question (on the HTML side, not knowing your spreadsheet I cannot say) and you only have the choice of using the error knowing that it will obviously not work well.
HTML (and XML which it is based on) is not meant for layout except in a rudimentary way (which is completed by CSS for that) but to list contents only.
Therefore, you must separate form from content, presentation from what is presented when using HTML (and thus use it only to indicate content, hence the HT in HTML).
Good work