Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Feb 2014
    Posts
    528
    Thanks
    84
    Thanked 0 Times in 0 Posts

    Adding link to Include file

    Hello

    I have this menu at the top of my Web page:

    -menu.jpg

    The code and links for the menu are part of an include file:

    Code:
     <nav>
        <!--#include virtual="../navMenu.html" -->
          </nav>
    The navMenu.html file looks like this:

    Code:
    <ul class="sf-menu" id="nav">
        <li class="selected"><a href="../index.aspx">Home</a></li>
        <li><a href="../portfolio.aspx">Portfolio</a></li>
        <li><a href="../twitter.aspx">Twitter</a></li>
        <li><a href="../contact.aspx">Contact</a></li>
    </ul>
    What I would like to do is introduce two more links to the left of the navigation bar for 'Register' and 'Log in' in the area of the orange
    square in the screenshot, so that they look something like this: Register | Login

    How would I do that, please?

  2. #2
    Administrator VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    11,334
    Thanks
    7
    Thanked 1,362 Times in 1,331 Posts
    I’d probably create a separate list for that, put it after the navigation list, give it its own ID or class name and then move it to the right place using CSS.

  3. #3
    Regular Coder
    Join Date
    Feb 2014
    Posts
    528
    Thanks
    84
    Thanked 0 Times in 0 Posts
    That sounds sensible - thanks VIP Stefan


 

Tags for this Thread

Posting Permissions

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