Page 1 of 1

Active button highlight ?

PostPosted: Sat Feb 15, 2014 3:35 am
by purek
I'm testing the software but I can't find a way to make an active button on the main menu to stay highlighted.

I read there was this issue discussed a year ago. Was it fixed by now? If so where is it?

Manual editing the files with CSS code, obviousl,y is not a solution as it's a pain. In other softwares i tested it was just a matter of a checkbox selection.

Re: Active button highlight ?

PostPosted: Tue Feb 18, 2014 11:10 am
by Aivars
You don't need to edit the CSS code, just HTML. Add class="active" to the corresponding li item and that should do it.
We are currently working on the new version but so far I haven't been able to convince others that a checkbox like you suggest is needed. A checkbox like that would raise another issue - say, you make a menu for the whole site - you would need to make first button active, export the menu, insert into the first page, make second button active, export the menu, insert into the 2nd page, etc. That sound a lot harder than just adding a class.

Re: Active button highlight ?

PostPosted: Tue Feb 18, 2014 11:12 pm
by purek
the other program I used is building JS menus. may be that makes a difference. They just have one checkbox for the whole menu. and script automatically picks the button to be highlighted.

Also they have a very easy way to update the menu. You just update javascript files and you do not touch any code on your pages.

While with your program you have to update every single page. So it is suitable only for 5-10 pages websites the most.

I'm not sure what what is the advantage of CSS menus if it makes it much harder to work with.

I can point you to that software i mentioned. Just do not want to mention it here due to ethical issues.

Re: Active button highlight ?

PostPosted: Thu Feb 20, 2014 12:25 pm
by Aivars
One important difference is that our menus will work even if visitor has no JavaScript enabled. To make it possible HTML has to be changed, just changing JavaScript is not enough.
You can PM me the software that you used.

Re: Active button highlight ?

PostPosted: Wed May 16, 2018 1:05 pm
by dazzler
Aivars wrote:You don't need to edit the CSS code, just HTML. Add class="active" to the corresponding li item and that should do it.


Hello, I've just purchased and installed version 5.2 of easy CSS menu, and I wonder if this method is still valid.

I have tried both:
Code: Select all
<li><div class="icon_1 with_img_24 buttonbg active"><a href="index.php">Home</a></div></li>

and
Code: Select all
<li><div class="icon_1 with_img_24 buttonbg"><div class="active"><a href="index.php">Home</a></div></div></li>


But neither seem to work.

Is there any way to make the active button/menu item highlight in some way, so that visitor have a visual indication on which section of the site they currently are?

Thank you.

Re: Active button highlight ?

PostPosted: Wed May 16, 2018 1:38 pm
by Aivars
Yes, this method still works but you need to add class "active" to "li" element like this:

Code: Select all
<li class="active"><div class="icon_1 with_img_24 buttonbg"><a href="index.php">Home</a></div></li>

Re: Active button highlight ?

PostPosted: Wed May 16, 2018 2:04 pm
by dazzler
Thanks Aivars! Works perfectly that way!