Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML How to Make a Website Adding Pages to a Website Build the Contact Page

What am i missing for contact page?

I am trying to select contact link on the header its not working after i finished this code:

<nav>
      <ul>
        <li><a href="index.html">Porfolio </a> </li>
        <li><a href="about.html">About</a></li>
        <li><a href="contact.html" class="selected">Contact</a></li>
      </ul>
    </nav>
 </header>
   <div id="wrapper">
     <section>
      <h3>General Information</h3>
        <p> Im not available for design work but im available for speaking gigs. If you have any questios please dont hesitate to contact me.</p>
        <p> Please use email, phone or twitter to contact me.</p>
     </section>
     <section>
      <h3>Contact Details</h3>
        <ul class="contact-info">
          <li class:"phone"> <a href="tel:582-5643">6045825643</a></li>
          <li class:"mail"> <a href="mailto:randyrana24@gmail.com">randyrana24@gmail.com></a></li>
          <li class:"twitter"> <a href="http://twitter.com/intent/tweet?screen_name=turnupnightlife"> @turnupnightlife </a> </li>
     </ul>
    </section>
Logan R
Logan R
22,989 Points

What do you mean by selected? Selected with CSS?

Hi Rana,

I went ahead and fixed both of your code blocks for you. See this thread: https://teamtreehouse.com/forum/posting-code-to-the-forum

3 Answers

here is my code for CONTACTS.HTML

<!DOCTYPE= html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Randhir Rana</title>
    <link rel="stylesheet" href="css/normalize.css">
    <link href='http://fonts.googleapis.com/css?family=Roboto:700italic,900|Open+Sans:700italic,800' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" href="css/main.css">
  </head>
 <body>
  <header>
    <a href="index.html" id="logo">
      <h1> Randhir Rana</h1>
      <h2> Designer </h2>
    </a>
    <nav>
      <ul>
        <li><a href="index.html">Porfolio </a> </li>
        <li><a href="about.html">About</a></li>
        <li><a href="contact.html" class="selected">Contact</a></li>
      </ul>
    </nav>
  </header>
   <div id="wrapper">
     <section>
      <h3>General Information</h3>
        <p> Im not available for design work but im available for speaking gigs. If you have any questios please dont hesitate to contact me.</p>
        <p> Please use email, phone or twitter to contact me.</p>
     </section>
     <section>
      <h3>Contact Details</h3>
        <ul class="contact-info">
          <li class:"phone"> <a href="tel:582-5643">6045825643</a></li>
          <li class:"mail"> <a href="mailto:randyrana24@gmail.com">randyrana24@gmail.com></a></li>
          <li class:"twitter"> <a href="http://twitter.com/intent/tweet?screen_name=turnupnightlife"> @turnupnightlife </a> </li>
     </ul>
    </section>   

       <footer> 
           <a href="http://twitter.com"><img src="img/twitter-wrap.png" alt="Twitter Logo" class="social-icon"></a> 
           <a href="http://facebook.com"> <img src="img/facebook-wrap.png" alt="Facebook Logo"class="social-icon"></a>
           <p> &copy;2014 Randhir Rana</p>
     </footer>
   </div>
  </body>
</html>
Lush Sleutsky
Lush Sleutsky
14,044 Points

Unfortunately, the footer code has nothing to do with what you are trying to accomplish, so more code would surely be necessary to solve your problem. There is something missing in your HTML and your CSS pages. Without seeing it, however, an answer cannot be given. Seems like you are not applying the proper "selected" class to the proper anchor tag. I sort of remember that exercise, but not enough to know without seeing the code. The footer code doesn't tell us anything...

I mean when I go to preview and select the link contact. This is in my contact.html file

Lush Sleutsky
Lush Sleutsky
14,044 Points

Your question is very hard to decipher. Could you possibly post the code and explain better what you're asking exactly?

When I preview the website from workspace, contact is still viewed as portfolio. Also it does not get highlighted dark green when I select the hyperlink Contact on the website.