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!

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 Positioning - Amending offset values not working?


From this video, I have the following CSS code:

figure { margin: 0; line-height: 0; position:relative;


figcaption { font-size: .9em; line-height: 1.5; color: #fff; padding: 1em;
background: rgba(19,43,102, .85);

position: absolute; right: 300; bottom: 0; top:5; width:100%;


I am manipulating the right/bottom/top values for the figscaption. Only changing the 'bottom' seems to make any visible difference. Is this because the figcaption is relative to figure? Or is this due to the width property?


1 Answer

Ryan McFarlane
Ryan McFarlane
14,845 Points

You need to specify a unit after the number like this

right: 300px;

Your bottom declaration works as you don't need to specify a unit if the value is 0