PDA

View Full Version : MULTIQUOTE button - Sprite CSS


MaR?
09-13-2009, 11:59 PM
Im using Css sprites. And I have just one "button" not working. Is MULTQUOTE Button.



<if condition="$show['multiquote_post']">

<a href="$post[replylink]" rel="nofollow" onclick="return false" class="multiquote spritebutton">

<img src="$stylevar[imgdir_button]/multiquote_<if condition="$show['multiquote_selected']">on<else />off</if>.gif" alt="$vbphrase[multi_quote_this_message]" border="0" id="mq_$post[postid]" />
</a>


The class=?multicitar spritebutons? should work this way:

.multiquote {
background-position : 0 -640px;
width : 82px;
height : 23px;
}
.multiquote:hover {
background-position : 0 -670px;
}


For the roll to work, I have to delete any tag <img?.> and put the class into tag <a ref?.>

The problem of MULTIQUOTE button is that it have 3 moment:

The normal
The hover
and when is PRESS (images/buttons/multiquote_on.gif) <--- This should NOT be CSS.

So, I want to know how to make this works.

Thanks!.

pein87
09-14-2009, 05:13 AM
make a three layer image like my double button.

using <a href="#" class="quoter" onmouseover="document.getElementsByClassName('quoter').style.ba ckgroundPosition= '0px -640px';" onclick="document.getElementsByClassName('quoter').style.ba ckgroundPosition='0px -1280px';"></a>

uses to events to trigger a rollover that doesn't flicker and minimal js code.

remember to set the css info for it as well.

MaR?
09-14-2009, 05:50 PM
Thanks AGAIN PEIN!.

Works... but:

1. The button display OK.
2. The button when mouse is over OK.
3. The button when you click work?s like a normal quote...

here I let you the code with your modification:

<if condition="$show['multiquote_post']">
<a href="$post[replylink]" class="multiquote spritebutton" onmouseover="document.getElementsByClassName('multiquote spritebutton').style.backgroundPosition= '0px -640px';" onclick="document.getElementsByClassName('multiquote spritebutton').style.backgroundPosition='0px -670px';"></a>
</if>




The original (default) code was:

<if condition="$show['multiquote_post']">
<a href="$post[replylink]" rel="nofollow" onclick="return false"><img src="$stylevar[imgdir_button]/multiquote_<if condition="$show['multiquote_selected']">on<else />off</if>.gif" alt="$vbphrase[multi_quote_this_message]" border="0" id="mq_$post[postid]" /></a>
</if>

MaR?
09-15-2009, 11:30 PM
Please????