Technical support This forum is closed.
Version 1.x > Technical support > cmsTreeMenu CSS View modes: 
User avatar
Member
Member
michaelstrauss - 8/30/2006 10:22:32 PM
   
cmsTreeMenu CSS
Is there no CSS for a mouseover effect on a CMSTreeMenu Item?

I currently have this as the style, but the only effect I get is the 'hand' and that is all.

.CMSTreeMenuItemMouseOver{ padding-right: 15px; padding-left: 5px; font-size: 8pt; padding-bottom: 5px; width: 180px; cursor: hand; color: black; padding-top: 5px; font-family: verdana; background-color: #fdd51d;}

User avatar
Member
Member
michaelstrauss - 8/31/2006 6:02:55 PM
   
Re: cmsTreeMenu CSS
Okay, I narrowed it down to the TreeMenuLink that needs the MouseOver effect. After some toying with the CSS, I realized that just using .CMSTreeMenuItem or versions like this, that I was getting no effect whatsoever. I then realized that these are treated as links (unlike the CMSMenu items) and began toying with the Link possibilities, but I still haven't got it narrowed down. I looked in the Kentico help but haven't found exactly the syntax I need to accomplish a mouseover effect on a TreeMenuLink (really just looking to change the text color on mouseover ... )

User avatar
Guest
admin - 8/31/2006 7:37:10 PM
   
Re: cmsTreeMenu CSS
Hi Michael,

you need to use the OnMouseOverScript property of the CMSTreeMenu like this:

OnMouseOverScript="this.className='asdf'"

where asdf is the name of the CSS class you want to use for mouseover. Similarly, you will set the original color back using OnMouseOutScript property:

OnMouseOutScript="this.className='MainCMSTreeMenuItem'"

Best Regards,

User avatar
Member
Member
michaelstrauss - 8/31/2006 9:52:24 PM
   
Re: cmsTreeMenu CSS
And this is done in the CodeBehind or the CSS?

User avatar
Guest
admin - 9/1/2006 5:06:11 PM
   
Re: cmsTreeMenu CSS
This is the property of CMSTreeMenu:

OnMouseOverScript="this.className='asdf'"

This is the CSS style:

.asdf
{

}

Regards,

User avatar
Member
Member
michaelstrauss - 9/1/2006 5:23:37 PM
   
Re: cmsTreeMenu CSS
Thanks Petr!

User avatar
Member
Member
calcat - 10/5/2006 1:39:48 AM
   
Re: cmsTreeMenu CSS
Hi Petr,

I am having a similar problem. I have read the posts and have tried to implement the OnMouseOverScript and OnMouseOutScript. Right now all I am trying to do is change the color of the text. I will do more once that is working.

I have in the CMSTreeMenu properties:
OnMouseOverScript="this.className='MOver'"
OnMouseOutScript="this.className='MOut'"

I have tried putting the MOver and MOut both in my .css file and on the .aspx page but it doesn't seem to matter. On the page it looks like:
.MOver { COLOR: #FF0000; FONT-SIZE: 80%; }
.MOut { COLOR: #00FF00; FONT-SIZE: 80%; }

Either nothing happens on either mouseover or mouesout, or, depending on tweaks I make in the code, the text gets larger on mouseover but does not change on mouseout.

Do you have any suggestions?

User avatar
Member
Member
michaelstrauss - 10/5/2006 3:07:28 PM
   
Re: cmsTreeMenu CSS
Oddly enough, once I figured it out...it still didn't make sense.
I have the "CMSTreeMenuItemMouseOver" and "CMSTreeMenuItemMouseOut" but these are just for the menu items. It treats the actually text (unlike in the regular CMSMenuItem) as a 'link'.
So add "CMSTreeMenuItemMouseOver A:hover" and change the color there.

Hope this helps!

User avatar
Member
Member
calcat - 10/5/2006 8:45:18 PM
   
Re: cmsTreeMenu CSS
Hi Michael,

Thanks so much for the help - it works now! Not sure I would have figured this one out on my own as it is a little different way of looking at things.

User avatar
Member
Member
michaelstrauss - 10/5/2006 8:51:13 PM
   
Re: cmsTreeMenu CSS
Indeed it is. Glad I could help :)