User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 427,223 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,289 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 949 | Replies: 3
Reply
Join Date: Jul 2008
Posts: 2
Reputation: MortiS is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
MortiS MortiS is offline Offline
Newbie Poster

Image close button on hover

  #1  
Jul 22nd, 2008
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!
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2008
Posts: 74
Reputation: Troy III is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 11
Troy III's Avatar
Troy III Troy III is offline Offline
Junior Poster in Training

Re: Image close button on hover

  #2  
Jul 22nd, 2008
-----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?!!
Reply With Quote  
Join Date: Jul 2008
Posts: 2
Reputation: MortiS is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
MortiS MortiS is offline Offline
Newbie Poster

Re: Image close button on hover

  #3  
Jul 23rd, 2008
Originally Posted by Troy III View Post
-----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.
Reply With Quote  
Join Date: Jun 2008
Posts: 74
Reputation: Troy III is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 11
Troy III's Avatar
Troy III Troy III is offline Offline
Junior Poster in Training

Re: Image close button on hover

  #4  
Jul 23rd, 2008
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.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 11:28 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC