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
Japneet Singh
4,675 PointsBackground-image: url attribute
just wanted to know what do we need to type within the brackets in the url tab
Background-image: url(' ');
given that my image is on the desktop.
thanks in advance
1 Answer
Owa Aquino
19,277 PointsHello mate!
The best way to do this, if you're using a Windows OS. Right click on the image(on Desktop as you have said) and select Properties in the options. After that you'll be able to see the location of your image, then copy the path and paste it to your code. (don't forget to add your image name).
like so.
Background-image: url('C:\Users\YourPCNAME\Desktop\yourimage.jpeg');
Cheers!
Japneet Singh
4,675 PointsJapneet Singh
4,675 Pointsthanks man i found my mistake i added some dots before the url