How to set an href to a background div

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • keydrive
    New Member
    • Oct 2007
    • 57

    How to set an href to a background div

    Hi,

    I would like to assign a hyperlink to this image within CSS. The reason I am not placing the image on the HTML page directly is that I have a flash image that I would prefer to show but in the case where a user doesn't have flash I need this image to appear.

    Suggestions?

    Code:
    #bg { 
    		background-image: url('images/banner-1.jpg');
    		height: 50px; 
    		width: 100px;
    		margin-left: auto ;
    		margin-right: auto ;
    }
  • RamananKalirajan
    Contributor
    • Mar 2008
    • 608

    #2
    Look over this link

    Thanks and Regards
    Ramanan Kalirajan

    Comment

    • keydrive
      New Member
      • Oct 2007
      • 57

      #3
      Thanks Ramanan for the link.

      I found what I was looking for on www3.

      cheers,

      Code:
      <img src ="planets.gif" width="145" height="126" alt="Planets" usemap ="#planetmap" />
      
      <map name="planetmap">
        <area shape="rect" coords="0,0,82,126" href="sun.htm" alt="Sun" />
        <area shape="circle" coords="90,58,3" href="mercur.htm" alt="Mercury" />
        <area shape="circle" coords="124,58,8" href="venus.htm" alt="Venus" />
      </map>

      Comment

      Working...