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

CSS

How do I center align, change font and remove link underline of the navigation menu?

https://github.com/MichaelDavidEdwards/techdegree-project-2

Thank you for your time and assistance.

1 Answer

Blake Larson
Blake Larson
13,014 Points

I did this in codepen so ignore the extra margin and padding style in the * selector.

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
    line-height: 1.5em;
    font-family: 'Noto Sans JP', sans-serif;
}

h1, h2, h3, h4, p, .nav, footer, .container {
  text-align: center;
}

h1 {
    font-size: 2.5em;
    margin: 1em 0;
}

h2 {
    font-size: 1.5m;
    margin-top: 4em;
    margin-bottom: 4em;
   }

h3 {
    font-size: 1.25m;
   }

h4 {
    font-weight: 300;
    font-size: large;
    line-height: normal;
   }

p {
  font-weight: 300;
  font-size: large;
  line-height: normal;
}

/* Layout Containers */

.container {
    padding-left: 2em;
    padding-right: 2em;
}

.project {
    width: 400px;
    margin-top: 1em;
    margin-bottom: 1em;
}

.footer {
    margin-top: 3em;
}

/* Nav Styles */

main-header {
    display: block;
    background: white;
    border-radius: .3em;
    margin-bottom: 2em;
}

ul {
  list-style: none;
}

ul li {
  padding: 2px;
}

ul li a {
  text-decoration: none;
}

footer {
  padding: 50px 0;
}

/* ================================= 
  Media Queries
==================================== */

@media (min-width: 769px) {

    .project {
        width: 100%;
    }

}