G
G
gomer17262016-06-24 19:09:08
Java
gomer1726, 2016-06-24 19:09:08

How to change the background of another div when hovering over a div?

Tried like this

.div:hover .main-div{
background: url('img.jpg');
}

doesn't work because you can't change the background of a parent div when hovering over a child div

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
volyihin, 2015-12-06
@volyihin

Do the correct host, port come to the socket?
Print their values ​​to the console to be sure. Let's try to localize the problem.
By the way, Yandex does not have ready-made examples of how to work with them from java?
Well, I would use some convenient library for access via Http. You can, of course, on sockets, but it's too low-level.
For example Apache Http Client
hc.apache.org/httpclient-3.x/userguide.html
or similar.
If you do not want to pull additional libraries, then you can use the built-in java docs.oracle.com/javase/7/docs/api/java/net/HttpURL...
To write-read from a file, you can also look at FileWriter/Reader
https http://docs.oracle.com/javase/8/docs/api/java/io/...

A
Alexey Zakharov, 2016-06-24
@gomer1726

codepen.io/anon/pen/PzWpZX

A
Andrey Burov, 2016-06-24
@BuriK666

only on CSS in any way.
Implement it in JavaScript.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question