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 trialGreg Leibowitz
28,536 PointsHelp with Quiz: CSS Foundations > Framework Foundations > CSS Mastery
The question reads:
Using CSS, set the sticky class to be absolutely positioned 5px from the right of the document and 5px from the top of the document.
Thanks for your help!
12 Answers
Greg Leibowitz
28,536 PointsI think I am close...
.sticky {position:relative; float: top; float:right; padding: 5px; }
but not working.
marsha grasett
9,995 Pointsquestion states ----"absolutely positioned"
Greg Leibowitz
28,536 PointsOops, but I just tried this and still not working:
.sticky { position:absolute; float: top; float:right; padding: 5px;
}
marsha grasett
9,995 PointsYou use the positioning attributes top, left bottom and right to set the location
Chad Shores
Courses Plus Student 8,868 PointsSee if this works
.sticky {
position:absolute;
top: 5px;
right: 5px;
}
Also make sure your containing element has position: relative; applied
Greg Leibowitz
28,536 PointsYes! Thank you Charles Shores.
marsha grasett
9,995 Pointshey greg -
I was trying to give you hints, so you would understand it. Its so easy just to copy and paste - but it'll catch up with you later down the road.
I speak from experience ;)
Greg Leibowitz
28,536 PointsI have a lot to learn. Thank you both Marsha and Charles!
Chad Shores
Courses Plus Student 8,868 PointsYou're welcome. Make sure to review this one or more times: http://teamtreehouse.com/library/websites/css-foundations/page-layout
...and after you feel like you are starting to get the hang of it, here is a another course on CSS that I just finished. I loved it, and it helped to further cement my knowledge gained at Treehouse. http://www.codeschool.com/courses/css-cross-country
Greg Leibowitz
28,536 PointsWill do. Very cool!
James Barnett
39,199 PointsI was trying to give you hints, so you would understand it. Its so easy just to copy and paste - but it'll catch up with you later down the road.
This is such an important point to understand, for anyone who replies to a question here on the forum.
To add to what marsha put so succinctly, the goal of these forums is to help each other understand how it works, not to get past a code challenge.
Greg Leibowitz
28,536 PointsAs an instructor as well as a Treehouse member, I completely respect this point.