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 trialklaas foppen
6,569 Pointslabel an image
hey! I'm working on a project with bootstrap and so far everything works great but I came across a little problem, I want to create a little label:
<span class="label label-success">Success</span>
in the upper right corner of my homepage blog posts (featured image)
I plaid a little and there are some ways but none of them seems to be responsive sticking to the image.
1 Answer
Preben Frenning
Courses Plus Student 2,337 PointsHave you tried putting the label inside the same container? Then use this css:
position: absolute; top:0; right:0; You might also want to use percentages to make it fluid. F.ex: top: 2%;
I believe this should work if the elements are nested properly. Might work with position:relative; as well.
klaas foppen
6,569 Pointsklaas foppen
6,569 Pointstank you! it worked!