By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,447 Members | 1,136 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,447 IT Pros & Developers. It's quick & easy.

Doesn't seem possible

P: n/a
It doesn't seem possible. But would the following also seem a
violation of the general notions behind css?

You have a DIV, say asociated with class, 'topdiv'.

Inside of that you have an anchor (and whatever it contains),
associated with class, 'a'.

Somewhere else in, 'topdiv', there is a span or element (containing
whatever), associated with class, 'b'.

Can you read the pseudo selector :hover for 'a', and somehow modify
presentation for 'b'?

..topdiv.a A:hover .b ?

The anchor element becomes a trigger for a style change to b, in other
words. It doesn't seem possible. Yet both 'a' and 'b' are in scope in
'topdiv', but outside each other's scope.
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Els
Mark Johnson wrote:
It doesn't seem possible. But would the following also seem a
violation of the general notions behind css?

You have a DIV, say asociated with class, 'topdiv'.

Inside of that you have an anchor (and whatever it contains),
associated with class, 'a'.

Somewhere else in, 'topdiv', there is a span or element (containing
whatever), associated with class, 'b'.

Can you read the pseudo selector :hover for 'a', and somehow modify
presentation for 'b'?

.topdiv.a A:hover .b ?

The anchor element becomes a trigger for a style change to b, in other
words. It doesn't seem possible. Yet both 'a' and 'b' are in scope in
'topdiv', but outside each other's scope.


You can put <span class="b"> inside <a class="a">, and use
positioning to make it look like it's somewhere else.

..topdiv a.a:link .b{
position:relative;
left:8em;
top:3em;
color:red;
}
..topdiv a.a:hover .b{
position:relative;
left:8em;
top:3em;
color:blue;
}

<div class="topdiv">
<a class="a">hover this<span class="b"> and see this change
colour</span></a>
</div>

Not tested!

--
Els

Sonhos vem. Sonhos vo. O resto imperfeito.
- Renato Russo -

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.