SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru
    Join Date
    Nov 2004
    Location
    calif
    Posts
    737
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Getting log-in to disappear

    With some great help on this forum (thanks again) my nav menu shows a few nav options in the main menu, and when the user logs-in, it lines up all the menu choices on a horizontal line. The issue I'd like to fix is to make the log-in choice disappear when the user is logged-in. If you can overlook all the font tags, in the code below, I'd greatly appreciate any help.

    css:
    Code:
    .menu1 {
        font-size: 11px;
        font-family: verdana;
        text-align: right;
        float: right;
        color: #333333;
     margin: 0px 5px 0px 0px;
     padding: 0px 0px 0px 0px;
    }
    
    
    .sub-nav {
        font-size: 11px;
        font-family: verdana;
        text-align: right;
        color: #333333;
        margin: 0px 22px 0px 0px;
        padding: 0px 0px 0px 0px;
    }
    
    .sub-nav-links {
      color: #;
      font-size: 14px;
      margin: 0px 0px -20px 0px;
    }
    
    .sub-nav1 {
        font-size: 11px;
        font-family: verdana;
        text-align: right;
        float: left;
        color: #333333;
        margin: 0px 22px 0px 0px;
        padding: 0px 0px 0px 0px;
    }
    
    
    .sub-nav {float:right}
    
    .sub-nav1 p {
    margin:0
    font-size: 11px;
    font-family: verdana;
    color: #333333;
    }
    
    #welc{ float left;
    }
    
    .account
    font-size: 11px;
    font-family: arial;
     color: #333333;
    }
    Html:
    Code:
    <!--Begin Sub-Navigation. This only appears when a user is logged in.-->
    <div class="sub-nav">
    
    <img src="themes/default/images/arrow-red.gif">&nbsp;<a href="members/[var.user_name]"><font color="#333333" face="verdana">my account</font></a>&nbsp;<img src="themes/default/images/arrow-red.gif">
    <a href="credits.php"><font color="#333333" face="verdana">[var.lang_my_credits]: [var.member_credits]</font></a>&nbsp;<img src="themes/default/images/arrow-red.gif">&nbsp;
    <a href="logout.php"><font color="#000000" face="verdana">log out</font></a>&nbsp;&nbsp;
    
    <!--[onload;block=div;when [var.loggedin]=1;comm]-->
    
    </div>
    
    <!--Begin Sub-Navigation. This only appears when a user is logged in.-->
    <div class="sub-nav1">
    <p class="account">
    <span id="welc"><span style="color:#333333; font-size: 12px; font-face=verdana;">&nbsp;&nbsp;Welcome! You Are Now Logged In.</span></p>
    <!--[onload;block=div;when [var.loggedin]=1;comm]-->
    </div>
    
    <div class="menu1">
    
    &nbsp; <a href="[var.base_url]">&nbsp;<font color="#333333" font face="verdana">home</font></a>
    &nbsp;&nbsp;<a href="page.php?page=16"><font color="#333333" face="verdana">faq</font></a>
    &nbsp;&nbsp;<a href="[var.base_url]/join.php"><font color="#333333" face="verdana">register</font></a> 
    &nbsp; &nbsp;<a href="[var.login_out_link]"><font color="#333333" face="verdana">log in</font></a>
    &nbsp;&nbsp;<a href="page.php?page=9"><font color="#333333" face="verdana">search</font></a>
    &nbsp; &nbsp;<a href="page.php?page=6"><font color="#333333" face="verdana">upload</font></a>
    
    </div>

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,167
    Mentioned
    453 Post(s)
    Tagged
    8 Thread(s)
    Hmm, are you using a CMS for this? It sounds more like a PHP question. You would use a conditional statement for this.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •