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 trialSascha Cajandig
4,033 PointsIm not sure what this question is asking for me to do?
At first I thought it was asking for me to swap .logo out for .card, then I tried calling both... I am so confused. What makes it even more frustrating is that the solution to this is probably so simple but it is my lack of comprehending this question that is setting me back :'(
/* Complete the challenge by writing CSS below */
.logo{
position: absolute;
top: -45px;
left: 125px;
}
.card{
position: absolute;
}
<!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
Steven Parker
231,275 PointsYou nearly had it. To be a "positioning context" the wrapper needs a declared position type, but it doesn't have to also be absolute. Just a relative position will do.
Sascha Cajandig
4,033 PointsThank you so much!! ugh It was driving me crazy! Knew it was something like that!
Sascha Cajandig
4,033 PointsSascha Cajandig
4,033 Points"The logo's absolute position is relative to the browser viewport. Make .card the new positioning context for .logo." is the question in this challenge. Sorry; should have put this is the description.