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 trialMai Lon Ross
5,891 PointsExtra Credit CSS
I'm trying to position the About icon in the header. I have it awkwardly showing up, but can't move it to be like the shirt and phone. This is my line in the css that makes it appear:
.header .nav li.about a {background: url('../img/questionmark.png') no-repeat}
Thanks.
2 Answers
Mai Lon Ross
5,891 PointsThanks Geoffrey for your reply. I'd looked at the element already there, but it seemed to me like they are taking slices of a single long image that is the right width to get the pictures positioned correctly. I got mine to work with background-position: center;
geoffrey
28,736 PointsHi Mai, If I were you, I would look at the styles applied to the others icons already set. In your case, without more info, I would tell that's an issue with the background-position property.
Furthermore, I 've taken a look on the project and to the styles applied to the others icons, you should have something like that to apply your new icon.
.header .nav li.contact a {
background-position: 0px -105px;
}
.header .nav li a {
color: white;
text-decoration: none;
display: block;
line-height: 95px;
padding: 10px 0 0;
margin: 0 0 0 40px;
width: 90px;
text-align: right;
background: url('../img/nav-sprite.png') no-repeat 0px 105px;
text-transform: uppercase;
white-space: nowrap;
}
In other words, inspect the others elements using the dev tool bar, or directly through your css stylesheets as you have the project locally.
Hope it helps ;)
geoffrey
28,736 Pointsgeoffrey
28,736 PointsNice, you found a way to fix it !