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!
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

michael singh
5,927 Pointsgetting rid of the underlines from links
I can't seem to get rid of the underlines from the links of my page.
<header class="main-header">
<h3 class="logo">website.com</h3>
<ul class="main-nav">
<li><a href="index.html">Home</a></li>
<li><a href="portfolio.html">Portfolio</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</header>
*{
box-sizing: border-box;
text-decoration: none;
}
body{
text-align: center;
}
li{
list-style: none;
}
a{
text-decoration: none;
}
.main-header, .main-nav{
font-size: 1.2em;
margin: 0 auto;
padding-top: 0;
display: flex;
flex-wrap: wrap;
flex-direction: row;
align-items: flex-start;
}
.main-nav ul li{
flex-direction: row;
}
.logo{
margin: 0 auto;
}
2 Answers

michael singh
5,927 PointsSorry guys I just realized I had an additional stylesheet that was overwriting everything :/ lol

anil rahman
7,786 PointsTry using a psuedo-element:
a:link { text-decoration: none; }
Tushar Singh
Courses Plus Student 8,692 PointsTushar Singh
Courses Plus Student 8,692 PointsI cant see any underlined element, I literally just copied your code in my workspace.
a{ text-decoration: none; }
This should do the trick.