* Graham * Keyarn You already have a code to do this and it seems to be working for the 'home' link but your other pages do not have that header so I cannot tell if it works for them
your code for this actually looks better than mine
2017-04-08 13:33 (edited 2017-04-08 13:36 by Graham ) · (0)
* Keyarn * Graham Let me give it a try buh this de site dat have what i mean @ http://examthings.yn.lt there you will see HOME JAMB WAEC NECO NABTEP e.t.c in his header then in de home page de link HOME will have blue background and asuming you clicked On jamb then the blue background will move to the JAMB. So home can i code it
2017-04-08 13:14 · (0)
* Graham MARK ACTIVE NAVIGATION
Sets the class 'active' on the current item
example of very basic header structure
<div class="nav mark-active"><a href="/">home</a><a href="/blog">blog</a></div>
<script>
// Mark active navigation item (Current page)
  if ( document.getElementsByClassName('mark-active') )
  {
    window.mark_active = function ()
      {
        var items = document.getElementsByClassName('mark-active');
        if ( items != undefined && items != null && items [0] != undefined )
        {
          for (var h = 0; h < items.length; h++)
          {
            var item = items[h].childNodes;
            var loc = decodeURI ( document.location.pathname ).replace ( ' ', '+' ).replace ( /\/__xt.+/, '' );
            for (var i = 0; i < item.length; i++)
            {
              if (item [ i ] && item [ i ].getAttribute && item [ i ].getAttribute('href') == loc)
              { 
                item[i].className += ' active'; break; 
              };
            }
          }
        }
      };
    window.mark_active ();
  }</script>

Copy code
2017-04-08 08:27 (edited 2017-04-08 12:43 by Graham ) · (0)
* ezed Sir pls i need help
2017-04-08 01:24 · (0)
* ezed Plsss I'm a new comer in xtgem blog i need a help on template how will i change my template not xtgem own
2017-04-08 01:15 · (0)
* Graham * Keyarn that css is fine but probably does not do what you want or you are putting it somewhere it gets over ridden
Do you mean 'mark active navigation item' ?
it depends on how the navigation is constructed
but if it is basically links in a <div> then xtgem has a built in system
all you have to do is have 'xtgem_template.css' with at least one class (even just a dummy one like .dummy {})
and then add xt_navigation class to the div
and the class 'active' is added to the active item (you set your styles in that class)
I also have a javascript that does the same thing
it all depends on your nav code which one you use
so which site is this on ?
2017-04-08 00:47 (edited 2017-04-08 00:50 by Graham ) · (0)
* Keyarn * Graham Ok thank you sir!!! But sir plz i av been trying dis css but not working and i dont know why
a:link,a:visited{color:#f44336;text-decoration:none;}
a:hover,a:active{background-color:green;}

Copy code
Asin asuming i have some navigation menus @ my header like Homw,Musik,Game,Video e.t.c and i want in a means where by if i am in my home page, then de link Home will have a green background plz help me out sir
2017-04-07 22:08 · (1)
* Graham * Keyarn This can be done using a xt:include with a default for 'non existing' files
<form action="<xt:url>" method="post">
  <input name="user" value="{_$user|}" required="required" />
  <input type="submit">
</form>
<xt:include default="/members/no_user" file="/members/{_$user|default}" />

Copy code

You then create files for each username
plus
'default' for the empty form
'no_user' for incorrect entries
http://auldphart.yn.lt/members/

demo http://auldphart.yn.lt/0000
graham and keyarn are valid entries
2017-04-07 08:52 (edited 2017-04-07 10:19 by Graham ) · (0)
* Keyarn * Graham Sir Plz Answer Me Am In Hast To Know This
2017-04-07 07:40 · (0)
* Keyarn * Graham Can you give me example?
2017-04-06 09:06 · (0)

Online: Guests: 1