HTML rollover code gets kicked out

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
User avatar
genestevo
Forum Members
Forum Members
Posts: 72
Joined: Thu Jan 26, 2012 11:50 am

HTML rollover code gets kicked out

Post by genestevo »

Hi Guys, I'm trying to add a simple rollover to a button on this page:
https://historypoints.org/index.php?pag ... ay-station
The current code works perfectly as per:

Code: Select all

<div style="float: left; margin-right: 15px;"><a href="{cms_selflink href='railway-history'}"> <img src="uploads/images/rollovers/sign-out.gif" alt="sign-out" width="120" height="60" /> </a></div>
However, when I add the rollover instructions it gets kicked out immediatley when I go back to regular view. As per:

Code: Select all

<!--rolloverBeggins-->
<div style="float: left; margin-right: 15px;"><a href="{cms_selflink href='railway-history'}"> <img src="uploads/images/rollovers/sign-out.gif" alt="sign-out" width="120" height="60" 
onmouseover=”this.src=’uploads/images/rollovers/sign-over.gif ’ ” alt="sign-over" width="120" height="60"
onmouseout=”this.src=’uploads/images/rollovers/sign-out.gif ’ ” alt="sign-out" width="120" height="60"/> </a></div>
<!--rolloverEnds-->
I chose this way as it is the most simple, for the benefit of another (and myself if I'm honest). Am i doing something wrong with my code or should I go the CSS route.
Cheers and best wishes,
Eugene.
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1621
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: HTML rollover code gets kicked out

Post by DIGI3 »

I'm not sure what the terms "kicked out" and "regular view" mean, could you elaborate?

If I were to take a guess perhaps you mean that the wysiwyg editor is stripping out your code? If that's the case, I would recommend disabling it for that content block, or using one that lets you specify what it strips/doesn't strip.

But yes, just giving it an id/class and doing the rollover in css or non-inline js would probably be better regardless.
Not getting the answer you need? CMSMS support options
User avatar
genestevo
Forum Members
Forum Members
Posts: 72
Joined: Thu Jan 26, 2012 11:50 am

Re: HTML rollover code gets kicked out

Post by genestevo »

Tried disabling WYSIWYG editor, cleared browser and system cache. No joy. Either something wrong with my syntax, code in general or the way I hold my face. Will take advice and re-work in CSS (though it turns out rollover “…not that important really”).
Just goes to show, a little knowledge is never enough. Thanks again. I’ll mark this as solved.
Locked

Return to “CMSMS Core”