Hello!

I cant figure out, how can i accomplish the following: i need to show a close button over an image when mouse is hovering over it. Clicking this button will delete the image. The problem, ofcourse, is not the image deletion, but how to show a close button in the image corner on mouse hover?
The image is simple img tag.

Thanks!

-----DIV-----------------
[div] X
[ background image ]
--------------------------

...is one of the ways to go.
You can use the css to position & style the "x" letter with border box etc.
Now, what's eating me is: are you planning to show it anytime later after it is closed or not?!!

-----DIV-----------------
[div] X
[ background image ]
--------------------------

...is one of the ways to go.
You can use the css to position & style the "x" letter with border box etc.
Now, what's eating me is: are you planning to show it anytime later after it is closed or not?!!

Thanks for answering! The images are located in LI tags. After deletion, i remove the needed LI tag from the UL and i dont need to show the image after closing anymore. The user can add another images to the UL, but if he closes one, it's gone.

I understood your answer, but i want to try not to use the image as background, since those images are used as links.

There's no difference between using divs or images cause if you wrap div in link tag it will act same as wrapped link image.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.