[pmwiki-users] Custom Markup for Rollover
Kathryn Andersen
kat_lists at katspace.homelinux.org
Fri Jul 14 07:20:07 CDT 2006
On Fri, Jul 14, 2006 at 12:45:21PM +0100, Paul Johnston wrote:
> I am struggling trying to write a custom markup for a rollover and am
> wondering if it's possible.
>
> I have been given a site to "wiki-ise" as someone explained it to me,
> and it's got lots of image rollovers as links, and they want to keep them.
Hmmmm. (shakes head sadly) That is *so* 1990's...
> It's all done in DreamWeaver and uses DW's JS functions, so the HTML for
> a rollover looks like this:
>
> <a href="<linkurl>"
> onMouseOut="MM_swapImgRestore()"
> onMouseOver="MM_swapImage('ImageId','','img2',1)">
> <img src="img1"
> name="ImageId"
> alt="alt text">
> </a>
> How would you go about outputting this from wiki markup like this:
>
> (:rollover_link link img1|img2"alt" :)
>
> I'm not sure if that's the best way to do it, but it's the way I'm doing
> it at the moment. Suggestions?
What might be easier would be to
(a) forget the rollovers and just use CSS a:hover properties to make the
links change appearance on mouseover.
For example:
a {
background: white;
color: black;
}
a:hover {
background: blue url(/images/prettyimg);
color: white;
}
(b) don't forget the rollovers but use CSS id=link1 plus :hover
properties to make the links change backgrounds on mouseover
For example:
markup:
%id=link1%[[link]]
CSS:
#link1 a {
background: blue url(/images/img1);
color: black;
}
#link1 a:hover {
background: black url(/images/img2);
color: white;
}
You could put the CSS in a local.css page (or make your own skin if you
were intending to do so anyway).
Kathryn Andersen
--
_--_|\ | Kathryn Andersen <http://www.katspace.com>
/ \ |
\_.--.*/ | GenFicCrit mailing list <http://www.katspace.com/gen_fic_crit/>
v |
------------| Melbourne -> Victoria -> Australia -> Southern Hemisphere
Maranatha! | -> Earth -> Sol -> Milky Way Galaxy -> Universe
More information about the pmwiki-users
mailing list