473,385 Members | 2,210 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,385 software developers and data experts.

a:hover <div> that appears outside an <h ref>

Hello

this page works :
http://lilou.leuwen.chez.tiscali.fr/testlilou.htm
the source :
....
a.link:hover div.test2
{display : block;
position: absolute;
z-index: 1000;
background: #000000;}
....
<a class="link" href="#">tototo
<div class="test2">
blablabla
</div>
</a>
....

a.link:hover div.test2 <-- How should i write this ligne
{display : block;
position: absolute;
z-index: 1000;
background: #000000;}

with (the div is outside a) :
<a class="link" href="#">tototo</a>
<div class="test2">
blablabla
</div>

i have read :
http://www.w3.org/TR/1998/REC-CSS2-1.../selector.html
and i have not found informations
thank you for your answer

lilou.leuwen-at-libertysurf.fr

Jul 20 '05 #1
5 10009
"Lilou" <li**********@libertysurf.fr> wrote in
news:40***********************@news.free.fr:
a.link:hover div.test2 <-- How should i write this ligne
{display : block;
position: absolute;
z-index: 1000;
background: #000000;}

with (the div is outside a) :
<a class="link" href="#">tototo</a>
<div class="test2">
blablabla
</div>


a.link:hover + div.test2

That's called an "adjacent sibling" selector. Unfortunately, Windows
versions of MSIE don't support them; IIRC they'll treat the above selector
as applying to div.test2 anywhere. So unless you're willing to write off
MSIE, you'll need to use either a "wrapper" div or an extra class name.

Jul 20 '05 #2
Eric Bohlman wrote:
"Lilou" <li**********@libertysurf.fr> wrote in
news:40***********************@news.free.fr:

a.link:hover div.test2 <-- How should i write this ligne
{display : block;
position: absolute;
z-index: 1000;
background: #000000;}

with (the div is outside a) :
<a class="link" href="#">tototo</a>
<div class="test2">
blablabla
</div>

a.link:hover + div.test2

That's called an "adjacent sibling" selector. Unfortunately, Windows
versions of MSIE don't support them; IIRC they'll treat the above selector
as applying to div.test2 anywhere. So unless you're willing to write off
MSIE, you'll need to use either a "wrapper" div or an extra class name.


Mozilla doesn't support it either (I think Opera isn't correct at this
as well): <http://bugzilla.mozilla.org/show_bug.cgi?id=15608>

--
Anne van Kesteren
<http://www.annevankesteren.nl/>
Jul 20 '05 #3
In article Anne van Kesteren wrote:
a.link:hover + div.test2

That's called an "adjacent sibling" selector. Unfortunately, Windows
versions of MSIE don't support them; IIRC they'll treat the above selector
as applying to div.test2 anywhere. So unless you're willing to write off
MSIE, you'll need to use either a "wrapper" div or an extra class name.


Mozilla doesn't support it either (I think Opera isn't correct at this
as well): <http://bugzilla.mozilla.org/show_bug.cgi?id=15608>


This combination of :hover and + works with some rare Opera versions.
7.1 or 7.2 or some beta in between, but then it was broken again. Sibling
selectors OTOH have worked since O5 and multible sibling selectors since
O6.

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Saapi lähettää meiliä, jos aihe ei liity ryhmään, tai on yksityinen
tjsp., mutta älä lähetä samaa viestiä meilitse ja ryhmään.

Jul 20 '05 #4
Hello
thank you very much for your answers
I found a compromise : the div.test2 appears in a wrapper
http://lilou.leuwen.chez.tiscali.fr//bonic.htm : leave the mouse on the blue
words.
The results are not the same in IE6
(http://lilou.leuwen.chez.tiscali.fr/ie6.gif) and Mozilla 5.0
(http://lilou.leuwen.chez.tiscali.fr/mozilla5.gif):
with IE6 the text of the page move and the box appears, with Mozilla5 the
box appears over the rest of the text.

lilou.leuwen

"Lauri Raittila" <la***@raittila.cjb.net> a écrit dans le message de news:
MP************************@news.cis.dfn.de...
In article Anne van Kesteren wrote:
a.link:hover + div.test2

That's called an "adjacent sibling" selector. Unfortunately, Windows
versions of MSIE don't support them; IIRC they'll treat the above selector as applying to div.test2 anywhere. So unless you're willing to write off MSIE, you'll need to use either a "wrapper" div or an extra class name.


Mozilla doesn't support it either (I think Opera isn't correct at this
as well): <http://bugzilla.mozilla.org/show_bug.cgi?id=15608>


This combination of :hover and + works with some rare Opera versions.
7.1 or 7.2 or some beta in between, but then it was broken again. Sibling
selectors OTOH have worked since O5 and multible sibling selectors since
O6.

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Saapi lähettää meiliä, jos aihe ei liity ryhmään, tai on yksityinen
tjsp., mutta älä lähetä samaa viestiä meilitse ja ryhmään.

Jul 20 '05 #5
Anne van Kesteren wrote:
Mozilla doesn't support it either (I think Opera isn't correct at this
as well): <http://bugzilla.mozilla.org/show_bug.cgi?id=15608>


Mozilla now supports it: Gecko/20040114

--
Anne van Kesteren
<http://www.annevankesteren.nl/>
Jul 20 '05 #6

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

Similar topics

3
by: Paul Thompson | last post by:
When I put a <div ...> inside a <table> specification, functionality is not there. When I put the <table> inside the <div> everything works. Why is that?
0
by: Lilou | last post by:
Hello this page works : http://lilou.leuwen.chez.tiscali.fr/testlilou.htm the source : .... a.link:hover div.test2 {display : block; position: absolute; z-index: 1000;
44
by: Jim M | last post by:
I have had great success with using <iframe> with overflow-y set to auto. I can get a similar look with the <iframe> tag. BUT... In all cases I need to have fixed heights. Is there a way to...
4
by: He Shiming | last post by:
Hi, I'm wondering how can I use <DIV> to mimic a <TABLE>. In a bare <TABLE> without a width attribute, the width of the table get dynamically expanded according to the content. However, <DIV>...
8
by: localhost | last post by:
I would like to wrap all of the HTML inside of my <body> tag inside a <div> with in my code-behind. I do not want to touch the .aspx page template at all. I know how to make the body tag...
4
by: Gustaf | last post by:
I'm sure I've got this working before, but I always forget how to do it, because CSS isn't intuitive in this case. I got a simple 2 column layout: <div id="container"> <div id="left"> </div>...
13
by: wilq | last post by:
I got a little problem, maybe You could help me out. I have one layer that is used to darken all content on page (opacity 50%) to make other layer more visible. If i show two separate Layers -...
0
by: Patricia Mindanao | last post by:
Assume I have a HTML web page with a pre-defined <div...</divarea. When the users clicks now on a certain link on this web page (outside or inside this "div" area) then the content of a file say...
8
prino
by: prino | last post by:
Hi all, I've written code (in REXX) that takes files in legacy languages (PL/I, COBOL, z/OS assembler, etc) and converts them into HTML in a format similar to what's displayed in the z/OS ISPF...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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.