|
|
How I can style all effective website navigation items to have font bold when selected?
Return to Recent Questions
Q:
Can you please give me tips on how I can style all effective website navigation items to
have font bold when selected and normal font when not selected?
A:
Unfortunately, Deluxe Tree doesn't have such a feature. You can only
set it's color. You cannot set the font of menu item bold when selected.
You can set menu item's font bold onMouseover, see example here:
http://dhtml-menu.com/dhtml-tree/data-templates/vista-style-7-template-sample.html
You should add
the following code in your data file:
function changeFont(obj, over)
{
obj.style.fontWeight = over ? 'bold' : 'normal';
obj.style.fontSize = over ? '13px' : '12px'; // You can not use this line
}
var tmenuItems = [
["<div onMouseOver='changeFont(this, 1)' onMouseOut='changeFont(this, 0)'>Security</div>","", "", "", "", "", "", "", "", ],
["<div onMouseOver='changeFont(this, 1)' onMouseOut='changeFont(this, 0)'>Ease of Access</div>","", "", "", "", "", "", "", "", ],
["|<div onMouseOver='changeFont(this, 1)' onMouseOut='changeFont(this, 0)'>Internet Options</div>","", "", "", "", "", "", "", "", ],
["|<div onMouseOver='changeFont(this, 1)' onMouseOut='changeFont(this, 0)'>Windows Firewall</div>","", "", "", "", "", "", "", "", ],
["<div onMouseOver='changeFont(this, 1)' onMouseOut='changeFont(this, 0)'>Network and Internet</div>","", "", "", "", "", "", "", "", ],
["<div onMouseOver='changeFont(this, 1)' onMouseOut='changeFont(this, 0)'>Hardware</div>","", "", "", "", "", "", "", "", ],
["<div onMouseOver='changeFont(this, 1)' onMouseOut='changeFont(this, 0)'>Programs</div>","", "", "", "", "", "", "", "", ],
["<div onMouseOver='changeFont(this, 1)' onMouseOut='changeFont(this, 0)'>Appearance</div>","", "", "", "", "", "", "", "", ],
["|<div onMouseOver='changeFont(this, 1)' onMouseOut='changeFont(this, 0)'>User Accounts</div>","", "", "", "", "", "", "", "", ],
["|<div onMouseOver='changeFont(this, 1)' onMouseOut='changeFont(this, 0)'>Personalization</div>","", "", "", "", "", "", "", "", ],
["<div onMouseOver='changeFont(this, 1)' onMouseOut='changeFont(this, 0)'>Sound and Speech</div>","", "", "", "", "", "", "", "", ],
["<div onMouseOver='changeFont(this, 1)' onMouseOut='changeFont(this, 0)'>Additional Options</div>","", "", "", "", "", "", "", "", ],
];
Please, notice also that you should add this function every time when
you change your effective website navigation in DHTML Tuner application, as Tuner deletes
this function.
Return to Recent Questions
Related:
- March 12, 2009 - I have problems with image paths when I create net navigation menu in DHTML Tuner.
- March 16, 2009 - Is there any way to keep a effective website navigation lit up when going to another page?
- Apr 02, 2009 - I see "Incorrect Copyright" message in IE7 in the effective website navigation.
- Apr 19, 2009 - What can I do for people who have Javascript turned off so they can't use the effective website navigation...
- May 07, 2009 - Does your effective website navigation support right-to-left languages, like Hebrew?
- May 22, 2009 - I would like to have links of web navigation bar to our website when javascript turned off.
- May 24, 2009 - When set up links in the effective website navigation using Tuner app, it changes them to different paths.
- Jun 11, 2009 - The Norwegian characters are not showed in the effective website navigation correctly.
- Jun 17, 2009 - I want to have a different font and color for my css menu example submenu items...
- Jun 28, 2009 - Does your effective website navigation allows to keep the pressed menu-item hightlighed?
- Jul 15, 2009 - Can I create the following sample with your effective website navigation?
|