SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2005
    Posts
    86
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    lightbox and dreamweaver hotsports

    Hi All,

    I'm having a bit of trouble adding the java lightbox effect in dreamweaver when using hotspots. In the past i've got it to work with an image, but the code is different with the hotspots.

    I've copied an example of the code below if anyone can help.

    This is the graphic with the hotspot over it;
    <img src="web_images/cats/images/cats_01_small.gif" width="165" height="210" border="0" usemap="#Map2" /><map name="Map2" id="Map2">
    <area shape="rect" coords="24,16,146,189" href="web_images/contact/contact_back.gif"rel="lightbox" />

    Here is an example from where I have got it working.
    <a href="web_images/contact/contact_back.gif"rel="lightbox"><img src="web_images/cats/images/cats_05_small.gif" width="111" height="147" border="0" /></a>

    Many thanks

    Keith

  2. #2
    SitePoint Enthusiast
    Join Date
    Aug 2005
    Posts
    86
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry to be a pain, but is there any chance of sorting this problem out.

    The site is for a client and was hoping to sort it out asap.

    Many thanks

  3. #3
    SitePoint Wizard bronze trophy Centauri's Avatar
    Join Date
    May 2007
    Location
    Newcastle, Australia
    Posts
    3,718
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The lightbox javascript specifically searches for anchor <a> tags with the rel attribute set to "lightbox", but an image map area is not an anchor. It may be possible to modify the javascript, but I'm not sure on that one. Is there any reason why the image cannot be put inside a normal <a> ? Another possibility is to position and size empty <a> tags over top of the image if the image is to be larger than the active region.

  4. #4
    SitePoint Enthusiast
    Join Date
    Aug 2005
    Posts
    86
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The page contains a gallery of picture and had planed on just using one image with hotspots over each of the pictures on the page. My back up plan was to position the picture individually as I have flash files scattered though the page. Only have limited knowledge of flash and didn't want to trying my first full flash site. To much learning to little time.

    Thanks for answer my question.

  5. #5
    SitePoint Wizard bronze trophy Centauri's Avatar
    Join Date
    May 2007
    Location
    Newcastle, Australia
    Posts
    3,718
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can still have one image if that image is the background to a container (div or ul) sized appropriately. The container can then contain a number of <a> anchors which can be floated / sized / margined to place them over the appropriate spots on the background.

  6. #6
    SitePoint Enthusiast
    Join Date
    Aug 2005
    Posts
    86
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, seems a quicker way of sorting the problem.

    Thanks


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •