473,395 Members | 1,458 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

hover display problem


I'm having problems understanding display and hover.

I'm trying to hover over a question and have the answer display.

..question {
color: #fff;
background: purple;
width: 300px;
font-weight: bold;
padding-left: 5px;
}
..answer {
color: #000;
background: #fff;
width: 500px;
padding: 0px 20px 0px 20px;
display: none;
}

<div class="question">This is a question</div>
<div class="answer">This is the answer. This is the answer. This is the
answer. This is the answer. This is the answer. This is the answer. This
is the answer. This is the answer. This is the answer. This is the
answer. This is the answer. This is the answer. This is the answer. This
is the answer. This is the answer. This is the answer. </div>

..hover:question {display .answer}

Totally lost.
Feb 9 '07 #1
11 4978
zzpat <zz*******@gmail.comwrote:
>.hover:question {display .answer}
http://www.w3.org/TR/CSS1#basic-concepts

'display'
Value: inline | block | list-item | run-in | inline-block |
table | inline-table | table-row-group | table-header-group |
table-footer-group | table-row | table-column-group | table-column |
table-cell | table-caption | none | inherit
http://www.w3.org/TR/CSS21/visuren.html#display-prop

--
Spartanicus
Feb 9 '07 #2
Rik
On Fri, 09 Feb 2007 21:58:38 +0100, Spartanicus <in*****@invalid.invalid>
wrote:
zzpat <zz*******@gmail.comwrote:
>.hover:question {display .answer}

http://www.w3.org/TR/CSS1#basic-concepts

'display'
Value: inline | block | list-item | run-in | inline-block |
table | inline-table | table-row-group | table-header-group |
table-footer-group | table-row | table-column-group | table-column |
table-cell | table-caption | none | inherit
http://www.w3.org/TR/CSS21/visuren.html#display-prop

Indeed.

..question:hover .answer{display:block;}

--
Rik Wasmus
Feb 9 '07 #3
Scripsit zzpat:
I'm trying to hover over a question and have the answer display.
That's a wrong approach, at least in authoring for the WWW (which is what we
discuss here). You would rely on CSS in matters of disclosing essential
information to the user, thereby ignoring the usual CSS caveats.
.hover:question {display .answer}

Totally lost.
Yes, you are; you can't change the properties of another element upon
hovering an element.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Feb 9 '07 #4
Rik
Jukka K. Korpela <jk******@cs.tut.fiwrote:
>.hover:question {display .answer}

Totally lost.

Yes, you are; you can't change the properties of another element upon
hovering an element.
I'm not sure wether it's according to standards, but FireFox & Opera have
no problem with:

div:hover + div {color:green;}
--
Rik Wasmus
Feb 9 '07 #5
Rik wrote:
Jukka K. Korpela <jk******@cs.tut.fiwrote:
>>.hover:question {display .answer}

Totally lost.

Yes, you are; you can't change the properties of another element upon
hovering an element.

I'm not sure wether it's according to standards, but FireFox & Opera
have no problem with:

div:hover + div {color:green;}
--Rik Wasmus
I found an interesting link that does some of what I want.
http://www.adjustafresh.com/tutorial...-markup03.html

Hover changes text.
Feb 9 '07 #6
Rik
On Fri, 09 Feb 2007 22:54:09 +0100, zzpat <zz*******@gmail.comwrote:
Rik wrote:
>Jukka K. Korpela <jk******@cs.tut.fiwrote:
>>>.hover:question {display .answer}

Totally lost.

Yes, you are; you can't change the properties of another element upon
hovering an element.
I'm not sure wether it's according to standards, but FireFox & Opera
have no problem with:
div:hover + div {color:green;}

I found an interesting link that does some of what I want.
http://www.adjustafresh.com/tutorial...-markup03.html
Well, a perfect example about how most implementations of this nonsense
are evil. What if I wanted to copy a sentence from the content? Fat
chance, as soon as my mouse heads that direction the text is gone again.

--
Rik Wasmus
Feb 9 '07 #7
In article <eq*********@enews1.newsguy.com>,
zzpat <zz*******@gmail.comwrote:
>
I'm having problems understanding display and hover.

I'm trying to hover over a question and have the answer display.

.question {
color: #fff;
background: purple;
....
>
.hover:question {display .answer}

Totally lost.
You want understanding or you want to display an answer? Under
the bonnet of cars, mechanics do naughty things with tools, like
tap things with pliers or screwdrivers.

<http://members.optusnet.com.au/droovies/test/slack.html>

--
dorayme
Feb 9 '07 #8
Rik wrote:
>>
I found an interesting link that does some of what I want.
http://www.adjustafresh.com/tutorial...-markup03.html

Well, a perfect example about how most implementations of this nonsense
are evil. What if I wanted to copy a sentence from the content? Fat
chance, as soon as my mouse heads that direction the text is gone again.

--Rik Wasmus
I guess I don't see that problem in Firefox. Copying isn't a problem.
Needless to say this needs work but here's what I came up with.

div:hover p {
display: block;
font-weight: 100;
}
..question {
display: block;
width: 300px;
font-weight: bold;
padding-left: 5px;
}
..answer {
color: #000;
background: #fff;
width: 500px;
padding: 0px 20px 0px 20px;
display: none;
}

<div class="question">This is a question
<p class="answer">This is the answer. This is the answer. This is the
answer. This is the answer. This is the answer. This is the answer. This
is the answer. This is the answer. This is the answer. This is the
answer. This is the answer. This is the answer. This is the answer. This
is the answer. This is the answer. This is the answer.</p>
</div>
Feb 10 '07 #9
Rik
On Sat, 10 Feb 2007 15:52:44 +0100, zzpat <zz*******@gmail.comwrote:
Rik wrote:
>>>
I found an interesting link that does some of what I want.
http://www.adjustafresh.com/tutorial...-markup03.html
Well, a perfect example about how most implementations of this
nonsense are evil. What if I wanted to copy a sentence from the
content? Fat chance, as soon as my mouse heads that direction the text
is gone again.
--Rik Wasmus

I guess I don't see that problem in Firefox.
I see the problem in Opera, and in a lesser extent in MSIE & FireFox: one
has to _keep_ hovering either the tab or the text to let it remain
visible. That means if I move my mouse from a tab, in Firefox & MSIE I can
only do that downwards towards the text. Hovering and then mousing to the
left, roght or top will put the deafult tab2 back.

In Opera it's even worse, because there's a gap between the tab and the
content. On crossing this gap, the page will return to the default, so the
only way I can see that content is to keep my mouse hovered above the tab.
--
Rik Wasmus
Feb 11 '07 #10
Rik wrote:
uess I don't see that problem in Firefox.
>
I see the problem in Opera, and in a lesser extent in MSIE & FireFox:
one has to _keep_ hovering either the tab or the text to let it remain
visible. That means if I move my mouse from a tab, in Firefox & MSIE I
can only do that downwards towards the text. Hovering and then mousing
to the left, roght or top will put the deafult tab2 back.

In Opera it's even worse, because there's a gap between the tab and the
content. On crossing this gap, the page will return to the default, so
the only way I can see that content is to keep my mouse hovered above
the tab.
--Rik Wasmus
I'm of the opinion that clicking a mouse will end. Maybe someday css
will allow us to do a mouse clicks without clicking (something like
hover:click).

A FAQ like this usually requires a script and a click. I was trying to
do it without both - mostly without the click. To that end it did what
I wanted it to do.
Feb 12 '07 #11
Rik
On Mon, 12 Feb 2007 18:42:11 +0100, zzpat <zz*******@gmail.comwrote:
Rik wrote:
uess I don't see that problem in Firefox.
> I see the problem in Opera, and in a lesser extent in MSIE & FireFox:
one has to _keep_ hovering either the tab or the text to let it remain
visible. That means if I move my mouse from a tab, in Firefox & MSIE I
can only do that downwards towards the text. Hovering and then mousing
to the left, roght or top will put the deafult tab2 back.
In Opera it's even worse, because there's a gap between the tab and
the content. On crossing this gap, the page will return to the default,
so the only way I can see that content is to keep my mouse hovered
above the tab.
--Rik Wasmus

I'm of the opinion that clicking a mouse will end. Maybe someday css
will allow us to do a mouse clicks without clicking (something like
hover:click).

A FAQ like this usually requires a script and a click. I was trying to
do it without both - mostly without the click. To that end it did what
I wanted it to do.

IMHO I should be able to use all main functionality of a page using only a
keyboard (graphical effects I can do without). If that's not possible,
it's very, very likely some people won't be able to use the site at all.
--
Rik Wasmus
Feb 12 '07 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Shannon | last post by:
Hi there, I have an HTML page with one large background image in the left corner. I've got various links positioned randomly on the image, and I use <span> tags to display text on another...
1
by: Jon W | last post by:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"> <html> <head> <title>rolly</title> <!-- The desired performance for this gem would be to: 1. click on table cells 2. edit in INPUT 3....
0
by: Jon W | last post by:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"> <html> <head> <title>rolly</title> <!-- The desired performance for this gem would be to: 1. click on table cells 2. edit in INPUT 3....
7
by: fredo | last post by:
I've studied Eric Meyer's pure css popups, version two: http://meyerweb.com/eric/css/edge/popups/demo2.html which pops up an image when I roll over a text link. Now I want to pop up a large...
1
by: Ciuin | last post by:
Again I need your help. This is the test page I am working on: http://www.manfredkooistra.de/zeugs/test/test.php Description: The page shows a centered image and a navigation menue...
4
by: bne | last post by:
Hi, My brain's a bit fried on this one. I'm using the li:hover method to display sub menus at http://dev.hyl.co.uk/guide4life/. All works swimmingly in FF, however IE7 loses the hover (and so...
8
by: Haines Brown | last post by:
I want a hot text string to display an image only when hovered. In the body: .... <a id="link-a" href="#nogo"> <img id="photo" src="..." />hot text </a> ....
4
by: Sigilaea | last post by:
My previous post got squashed because m post is too long. Sorry for that: I have an AJAX page with a CSS menu at the top. My problem is the hover functionality stops working after someone clicks...
8
by: Meri | last post by:
Hello Everybody on the internet seems to think this is a problem with IE but for me it works fine with IE, but the submenus do not appear with Firefox andOpera. The html is a simple list with...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.