Activity Stream
48,167 MEMBERS
62672 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12
  1.     
    #11
    Member
    Quote Originally Posted by Apathetic View Post
    ^You can try do some php checking (maybe thru a variable) on which page you are currently in.

    PHP Code: 
    <li <?php echo $isHome?'class="active"':''?>><a href="/">Home</a></li>
    <li  <?php echo $isMyAccount?'class="active"':''?>><a href="/myaccount">My Account</a></li>
    <li  <?php echo $isEdit?'class="active"':''?>><a href="/editaccount">Edit Account</a></li>
    <li  <?php echo $isHome?'class="active"':''?>><a href="/logout">Logout</a></li>
    THere can be other ways of doing this, I'm just shedding some light.
    Can you help me do this?

    Quote Originally Posted by mRAza View Post
    if you are using smarty (as u mentioned above) see answer here:

    http://*******/uViQG
    I appreciate your reply, I'm gonna try this later.

  2.   Sponsored Links

  3.     
    #12
    Respected Member
    Try this
    Code: 
    <html>
        <head>
            <style type="text/css">
                .item {
                    width:900px;
                    padding:0;
                    margin:0;
                    list-style-type:none;
                }
    
                a {
                    display:block;
                    width:60;
                    line-height:25px; /*24px*/
                    border-bottom:1px  none #808080;
                    font-family:'arial narrow',sans-serif;
                    color:#00F;
                    text-align:center;
                    text-decoration:none;
                    background:#CCC;
                    border-radius: 5px;
                    -webkit-border-radius: 5px;
                    -moz-border-radius: 5px;
                    margin-bottom:0em;
                    padding: 0px;
                }
    
                a.item {
                    float:left;        /* For horizontal left to right display. */
                    width:145px;       /* For maintaining equal  */
                    margin-right: 5px; /* space between two boxes. */
                }
    
                a.selected{
                    background:orange;
                    color:white;
                }
            </style>
        </head>
        <body>
          <a href="/" class="item">Home</a>
          <a href="/myaccount" class="item">My Account</a>
          <a href="/editaccount" class="item">Edit Account</a>
          <a href="/logout" class="item">Logout</a>
            <script>
                var anchorArr=document.getElementsByTagName("a");
                var prevA="";
                for(var i=0;i<anchorArr.length;i++)
                {
                    anchorArr[i].onclick = function(){
                        if(prevA!="" && prevA!=this)
                        {
                            prevA.className="item";
                        }
                        this.className="item selected";
                        prevA=this;
                    }
                }
            </script>
        </body>
    </html>

Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Highlight searched text plugin
    By r00ts in forum Wordpress
    Replies: 2
    Last Post: 9th Apr 2012, 07:10 PM
  2. [Hiring] Simple PHP Job
    By Apathetic in forum Completed Transactions
    Replies: 0
    Last Post: 14th Sep 2011, 02:08 AM
  3. [Hiring] $10 simple job :D
    By viruz99 in forum Completed Transactions
    Replies: 8
    Last Post: 28th Nov 2010, 07:22 AM
  4. Something Simple
    By w00ty in forum Graphics Area
    Replies: 0
    Last Post: 14th Jul 2010, 07:58 AM
  5. Its seems so simple ...
    By S?nic in forum IP.Board
    Replies: 8
    Last Post: 20th Sep 2009, 12:42 AM

Tags for this Thread

BE SOCIAL