* Lordeagle * Waplocus Do it inside the forum twig(slice it oUt)
2016-09-01 20:41 · (0)
* Waplocus i have html menu
<div id="PH">home</div><div id="PH"> Forum </div>
i want a css code
to change the background color of
#PH Wen in active... e.g #PH:active?
2016-09-08 08:38 · (0)
* Waplocus * Waplocus No Help?.
2016-09-08 09:29 · (0)
* Graham * Waplocus
you are only supposed to use an id once on a page they should be unique to that element
an active element is the one you just clicked on
so just give the divs a class instead of an id and declare .classname:active{...} in your css
note that a few browsers do not allow :active on anything other than a link or button

If you want to mark the current page in a header menu
this is the code that xtgem uses to mark the current page in xt_navigation containers
it adds a class of "active" to the current pages item in the menu
<script>
if ( document.getElementsByClassName ){
        window.__xt_mark_active_navigation = function (){
            var items = document.getElementsByClassName('xt_navigation');

            if ( items != undefined && items != null && items [0] != undefined )
            {
                items = items[0].childNodes;

                var loc = decodeURI ( document.location.pathname ).replace ( ' ', '+' ).replace ( /\/__xt.+/, '' );

                for (var i = 0; i < items.length; i++)
                {
                    if ( items [ i ].firstChild && items [ i ].firstChild.getAttribute && items [ i ].firstChild.getAttribute('href') == loc ) { items[i].className += ' active'; break; };
                }
            }
        };

        window.__xt_mark_active_navigation ();
    }
</script>

Copy code
it comes from this
http://xtgem.com/js/page_templates_simple.js
2016-09-08 12:54 (edited 2016-09-08 22:01 by Graham ) · (0)
* Lordeagle * Waplocus U can also add the hover effect usin js
2016-09-09 10:54 · (0)
* Waplocus * Lordeagle I Want to create an online service like that of savefrom.net any help?
2016-09-17 06:46 · (0)
* Lordeagle * Waplocus You need a host with php support
2016-09-18 07:53 · (0)
* Waplocus * Lordeagle I Alreadi av 1...
2016-09-18 10:02 · (0)
* Lordeagle * Waplocus Ok get the script or create(code) one.
2016-09-18 23:09 · (0)
* Waplocus * Lordeagle Wer can i get it?.
2016-09-19 05:32 · (0)

Online: Guests: 2