Connecting Tech Pros Worldwide Help | Site Map

With CSS put one image on top of the other and the bottom on be link

  #1  
Old June 30th, 2009, 01:48 PM
mikek12004's Avatar
Familiar Sight
 
Join Date: Sep 2008
Location: Athens, Greece
Posts: 181
I want to place ontop of a picture another which is (gif with transparecy so the image below will be seen at some points) the easiest is put the image below as background but I want this image to also be link any ideas?
  #2  
Old July 1st, 2009, 06:52 AM
mikek12004's Avatar
Familiar Sight
 
Join Date: Sep 2008
Location: Athens, Greece
Posts: 181

re: With CSS put one image on top of the other and the bottom on be link


OK found solution with this
Expand|Select|Wrap|Line Numbers
  1. <style type="text/css"> 
  2. .containerdiv { float: left; position: relative; } 
  3. .cornerimage { position: absolute; top: 0; right: 0; } 
  4. </style>
  5. <a href="#">
  6. <div class="containerdiv">
  7.     <img border="0" src="prod_img/01136.jpg" alt="m" title="m" width="170" height="170">
  8.     <img class="cornerimage" border="0" src="new_frame.gif" alt="m" title='m' width="172" height="172">
  9. </div>
  10.  
  #3  
Old July 1st, 2009, 04:04 PM
tharden3's Avatar
Site Addict
 
Join Date: Jul 2008
Location: Ocala, FL (United States)
Posts: 819

re: With CSS put one image on top of the other and the bottom on be link


I think I can help you, but help me to clarify the issue. If I understand correctly:

-You have two images that you are layering, one on top of the other.
-The image on the bottom is supposed to be a link
-The top image has a transparent layer that is supposed to make only certain areas of the bottom link 'clickable.'

If you are trying to control the areas of the link that are clickable by the user, there is a better way to do this than layering images. It is called "Image Mapping." I can help you with it, but let me know for sure that what I described above is what you are trying to accomplish before I go into more detail.

Kind regards,
Tim
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
Styling link underlines JD answers 10 November 13th, 2008 10:45 AM
Need help with simple javascript assignment Caution answers 3 October 18th, 2006 06:36 PM
simpler example of the padding bug phil-news-nospam@ipal.net answers 36 May 13th, 2006 07:05 AM
Cascading not happening with javascript page loading Tudor Tihan answers 5 March 19th, 2006 10:35 PM