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 trial
Jackie Jen
2,723 PointsHow to create text and button on a mobile screen image?
Let said i have an iphone image. I want to create text and button on the iphone screen image. This will let user look like the iphone image is works. May i know how can i do that?
1 Answer
Samuel Webb
25,370 PointsYou could set the image to the background of a div element using CSS and give it height and width properties that match up with the image size. Then inside of that element, you could create a div with some padding on each side. Inside of that, you could make a textarea element that takes up the remaining pixels which should equal the size of the screen. Also, make the background of that textarea transparent so that it shows the actual screen behind it. You'd have to figure out the exact CSS on your own though.
Samuel Webb
25,370 PointsSamuel Webb
25,370 PointsActually here you go. Here's a starting point. You're going to have to tweak this to get exactly what you were looking for but this should help you get going:
Samuel Webb
25,370 PointsSamuel Webb
25,370 PointsI'll leave you to figure out the button on your own.