We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 791
    • 46 Posts
    Hi All,

    I have to build a site that has a series of boxes containing images with text overlaying them. The designer wants the images to be links and to have a rollover state, as well as having the text on top as a link. The client must be able to change the image and its rollover state, as well as the overlaid text.

    Normally I would do this with a background image and CSS, but the images must be in a TV so the client can change them. So I need to use javaScript, I guess... Or maybe a custom snippet? Trouble is, I’m not a programmer, just good at implementing other (cleverer) people’s work!

    Does anyone have an idea how I can use two image TV’s and get them to swap on rollover?

    I’m using Revo 2.0.7, by the way.

    Thanks,
    Andrew
      Learning a little more each day.
      • 26016
      • 561 Posts
      Sure, you can write your CSS in the head section of your template, and just use the TV’s right there. Example off the top of my head - adjust the syntax as needed:

      <style type="text/css">
       mylink.a {url('[[*TVOne]]') no-repeat;}
       mylink.a:hover {url('[[*TVTwo]]') no-repeat;}
      </style>


      And now your biggest problem will only be a client who can’t edit images to save their life. smiley
        MODx and Wordpress development
        Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4
        • 791
        • 46 Posts
        Thanks Samba. Why didn’t I think of that?

        The client’s always right, remember?
          Learning a little more each day.
          • 26016
          • 561 Posts
          Glad to help! TV’s are just about the greatest thing ever.

          Yeah, the customer is always right. wink One ironic thing about MODx’s extreme flexibility is that it allows you to implement pretty much anything, whether it’s something wonderful, or something mega-stupid, so you can still earn your fee even from the most boneheaded client! (did I say that?)

          I almost want to have a "hall-of-shame" portfolio along with my regular one. Ascerbic commentary everywhere, cheap jokes at their expense, and other fun.
            MODx and Wordpress development
            Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4
            • 791
            • 46 Posts
            Be sure to follow @killallclients on Twittter!
              Learning a little more each day.