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 trialKathryn Kassapides
9,260 PointsNext, give .logo a top offset of -45px and a left offset of 20px.
maybe this question should be reworded because the term offset is very confusing.
/* Complete the challenge by writing CSS below */
.logo {
position: absolute;
}
.logo {
offset: -45px 0px 0px 20px;
}
<!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="banner">The best guide to the best city!</div>
<div class="card">
<img class="logo" src="city-logo.svg" alt="An illustration of a building">
<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>
<p>Candy sugar plum pudding marzipan cupcake toffee donut sweet roll. Sesame snaps cake liquorice halvah. Bonbon icing candy canes. Cookie powder topping chupa chups candy canes candy. Tart danish croissant macaroon biscuit. Cookie candy canes lemon drops jelly-o. Cheesecake gummi bears liquorice. Toffee bear claw cake gummi bears candy canes tiramisu pudding. Candy canes pie jelly beans jujubes marshmallow topping dessert marshmallow. Icing apple pie danish cake marzipan topping. Chocolate sweet roll candy canes tart croissant apple pie marshmallow ice cream. Jelly toffee halvah gingerbread bonbon sweet pie chocolate cake. Tart sweet roll pastry sweet roll.</p>
<p>Cupcake biscuit chocolate cake. DragΓ©e gingerbread halvah marzipan bonbon donut chocolate cake wafer. Sweet roll bonbon jelly lollipop lollipop gummi bears chocolate cake halvah. Fruitcake biscuit jelly-o carrot cake. Brownie gingerbread gingerbread chocolate bar toffee tart jujubes icing. Lollipop cheesecake sweet roll lollipop cheesecake muffin chocolate bar carrot cake caramels. Liquorice cotton candy cheesecake macaroon. Tootsie roll marzipan chocolate jujubes jujubes.</p>
<p>Carrot cake biscuit apple pie. Gummies cookie chocolate powder powder oat cake. Jujubes tootsie roll jelly beans biscuit marshmallow lemon drops cookie. Donut carrot cake fruitcake gummi bears danish marzipan cake cake chocolate cake. Biscuit dessert macaroon cupcake sweet muffin cake. Tootsie roll bear claw cheesecake bear claw lemon drops.</p>
</div>
</body>
</html>
1 Answer
Peter Vann
36,427 PointsHi Kathryn!
I understand your confusion.
If unfamiliar with certain ways the tasks can be worded, it could lead one to presume "offset" might be some sort of CSS keyword.
In this case, however, they are just using "offset" to mean "new position with respect to the element's original position".
Think: "move element by"
But you seem to have already figured that out - so, kudos!
:)
Anywho,
Stay safe and happy coding!
Kathryn Kassapides
9,260 PointsKathryn Kassapides
9,260 Pointsthe answer is:
.logo { top: -45px; left: 20px; }
but the offset word really confused me for a while