Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: clickable image  (Read 3215 times)

0 Members and 1 Guest are viewing this topic.

jaysonyates

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 26
    • My Sons website
clickable image
« on: February 21, 2005, 01:47:18 am »

I tryed many sites, and I still can not get my image to become clickable, the text either is on the side, top or bottom, but the text is next over the graphic and clickable, what do I do to make it so.

Thanks
« Last Edit: February 23, 2005, 01:40:15 am by TranzNDance »
Logged

jaysonyates

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 26
    • My Sons website
Re: clickable image
« Reply #1 on: February 21, 2005, 01:50:39 am »

Sorry, I also forgot, I waht the clickable graphic to be one color, and when you move over the graphic it changes color. So IE, mouse not over pix, green, mouse over pix RED. I know that it should be ONMOUSEOVER, but the coding is not working right. Is there an example od that such thing.

Thanks again.
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: clickable image
« Reply #2 on: February 21, 2005, 03:15:20 am »

why don't you post a small example, once we see some of your code we can probably tell you where you are going wrong.

There are two ways to attempt to get the button to change color/image on mousover. One is with java which is what you are referring to. The second is with css and modifying the css for the state of the anchor.

See if this article helps you.

http://www.search-this.com/website_design/css_rollover_buttons.aspx
Logged

jaysonyates

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 26
    • My Sons website
Re: clickable image
« Reply #3 on: February 21, 2005, 04:10:48 am »

if you0 go to http://jaysarahandy.com/photos/index.php you will see a graphic surrounding the text, and I can only get the text to be clickable, but not the graphic.

Thanks

why don't you post a small example, once we see some of your code we can probably tell you where you are going wrong.

There are two ways to attempt to get the button to change color/image on mousover. One is with java which is what you are referring to. The second is with css and modifying the css for the state of the anchor.

See if this article helps you.

http://www.search-this.com/website_design/css_rollover_buttons.aspx
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: clickable image
« Reply #4 on: February 21, 2005, 08:00:00 am »

It's because you have set the image to be the BACKGROUND of the cell where your text is.
Code: [Select]
<!-- BEGIN login -->
                                        <td></td>
                                        <td></td>
                                        <td background="themes/canvas/images/button.gif" height="60" width="143">
                                                <a href="login.php?referer=%2Fphotos%2Findex.php">&nbsp;&nbsp;&nbsp;<font color="black">Login</font></a>
                                        </td>
                                        <td></td>
<!-- END login -->

Which is OK, but it means that none of the image is clickable.  Pretty much no way around it if you want the text on top of the image.

you might try:

Code: [Select]
<!-- BEGIN login -->
                                        <td></td>
                                        <td></td>
                                        <td>
                                                <a href="login.php?referer=%2Fphotos%2Findex.php"><div style="background-image:url(themes/canvas/images/button.gif);height:60px;width:143px;">&nbsp;&nbsp;&nbsp;<font color="black">Login</font></div></a>
                                        </td>
                                        <td></td>
<!-- END login -->

that should make a clickable div that has the same image as the background.

totally untested YMMV.
Logged

jaysonyates

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 26
    • My Sons website
Re: clickable image
« Reply #5 on: February 23, 2005, 12:57:03 am »

I went instead with an imagemap, it was easier to do then the <div> so this really can be set as:


SOLVED
Logged
Pages: [1]   Go Up
 

Page created in 0.057 seconds with 20 queries.