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

Thank you everyone I have managed to remove the underline but still can't create centered text or coloured hover states.

I managed to remove the underline from my text links but can't seem to center the text or create coloured hover or selected states. Can anyone help?

5 Answers

Can you post your code?

for the color, have you used an !important anywhere?

Otherwise this should do:

a {color: #000;}

a:hover {color: #F00;}

For centering, depends on what you want to center where and how... That's why I ask for your code snippet

could be, for example:

a {text-align: center}

or

a {margin: 0 auto; width: 200px;}

Hi Andreas

Thank you for getting back to me. I have attached the code below and followed the tutorial as it outlined. Perhaps you can see what I am missing.

I also want to center the pictures on my website.

Many thanks

Tom

https://w.trhou.se/dztq7jq1j1 https://w.trhou.se/7ofxqh3w6b

links don't seem to work for me. Can you paste your code here?

Hi Andreas

can you try this link.

Thanks again!

https://w.trhou.se/q0h9k9016b

Hi Tom

You are using .hover, this should be :hover

nav a.visited {
  color: #414042;
}

nav a.selected, nav a.hover {
  color: #414042;
}

should be

nav a:visited {
  color: #414042;
}

nav a.selected, nav a:hover {
  color: #414042;
}

Only selected should be a class

You also have these classes defined as such:

<span style="color:#ffffff;" class="selected;" class="hover;">

should be

<span style="color:#ffffff;" class="selected hover">

No semicolon behind it and multiple classes should be divided with spaces.

Also since hover is no class anymore it should be:

<span style="color:#ffffff;" class="selected">

Hi Andreas

Thank you very much again.

I'll apply these styles and see how things go. It obviously takes quite a lot of practice to remember these nuances in coding.

Cheers

Tom

Actually I just tried that and it doesn't seem to be changing the role over or clicked state. Sorry! not sure what I am doing wrong still.

Code below:

https://w.trhou.se/ttzrl0ibs6

workspace doesn't seem to work