www.webdeveloper.com
Results 1 to 4 of 4

Thread: menu to show current page problem

  1. #1
    Join Date
    Jul 2012
    Location
    Vantaa, Finland
    Posts
    125

    menu to show current page problem

    I am trying to show current page in my menu. I have used the following code;

    CSS
    #menu#Home a#index
    #menu#Studies a#studies
    #menu#Books a#books
    #menu#Author a#author
    #menu#Food For Thought Blog a#food
    #menu#Contact us a#contact
    #menu#Site Map a#sitemap
    {color: #a52a2a;}
    html

    </div>
    <div id="menu" style="background-color: #fffff0"><a id="up"></a>
    <nav style="font-family:verdana; padding-top: 3px">
    <ul>
    <li><a id="index" href="index.html" >Home</a></li>
    <li><a id="studies" href="Free-studies-to-download.html">Studies</a></li>
    <li><a id="books" href="Free-books-to-download.html">Books</a></li>
    <li><a id="author" href="author.html">Author</a><li>
    <li><a id="food" href="/wp/">Food For Thought Blog</a></li>
    <li><a id="contact" href="contact_us.html">Contact Us</a> </li>
    <li><a id="sitemap"href="sitemap.html">Site Map</a></li>
    </ul>
    </nav>
    <hr />
    </div>
    </div>

    I can't get the current page to work. I have also tried removing the # before the menu but that didn't work either. What do I need to do to sort this out?

    This is my first website that I have coded.

  2. #2
    Join Date
    Mar 2012
    Posts
    1,651
    1. I can't make any sense of the css.
    2. The "up" link does nothing.
    3. The <nav> tag iis not supported by IE8 (and earlier). So I'd not use it.

  3. #3
    Join Date
    Jul 2012
    Location
    Vantaa, Finland
    Posts
    125
    The up link is a name for an anchor for a link lower down the page.
    css is set out; left hand column is the name of the link in the nav bar (#Home) and the right hand side (#home) is the link to the css

    I'll take the nav tag out. thanks for that.

  4. #4
    Join Date
    Mar 2012
    Posts
    1,651
    Quote Originally Posted by tony webb View Post
    The up link is a name for an anchor for a link lower down the page.
    Better to use <div id="up"> or <span id="up">.

    Quote Originally Posted by tony webb View Post
    css is set out; left hand column is the name of the link in the nav bar (#Home) and the right hand side (#home) is the link to the css
    CSS does not work like that (at least, not as far as I'm aware). If its a feature introduced in CSS3, then, like <nav>, it won't work in IE8.

Thread Information

Users Browsing this Thread

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

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
  •  
HTML5 Development Center



Recent Articles