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 CSS Layout Basics Positioning Page Content CSS Positioning Challenge

help with -45 please

whats wrong with -45px; is it the hyphen

style.css
/* Complete the challenge by writing CSS below */
.logo{
  position:absolute;}

.main-logo{
  top: -45px;
  left: 125px;
}
index.html
<!DOCTYPE html>
<html>
<head>
    <title>CSS Positioning</title>
    <link href='https://fonts.googleapis.com/css?family=Varela+Round' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" href="page.css">
    <link rel="stylesheet" href="style.css">
</head>
    <body>
        <div class="card">
            <img class="logo" src="city-logo.svg" alt="logo">

            <h2>Best City Guide</h2>
            <p>Cheesecake oat cake marshmallow. Bonbon pastry apple pie danish donut bonbon marshmallow caramels. Bear claw chocolate bar lemon drops. Carrot cake jelly beans jelly beans pie.</p>
        </div>
    </body>
</html>

1 Answer

Adomas Domeika
Adomas Domeika
6,151 Points

You are selecting the wrong class. top and left offsets should be for .logo selector, not the .main-logo, because you don't even have a class named .main-logo

Caleb Kleveter
Caleb Kleveter
Treehouse Moderator 37,862 Points

Great Answer! I just wanted to let you know I edited your answer to emphasize the CSS class names you are using. I added a back-tick (`) to the front end the end of the name.

Adomas Domeika
Adomas Domeika
6,151 Points

Oh, sorry about that. I am new here.. Thanks for edit anyway.