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
Paul Jackson
8,943 PointsTrying to insert images in text editor on my computer...
If I'm using Workspaces and want to insert an image using the following syntax:
#body {
background: gray url('../images/Phoenix.jpg') no-repeat center;
}
The image will show up fine because it's saved to a folder within the Workspace.
Let's say I'm using a text editor like Sublime that's just a program on my computer. If I try to use the same file path the image won't show up. And if I don't have a web URL to link the image to my page, I can't see an image at all.
My question is, how do I get an image saved on my computer to show up while using a text editor also on my computer?
I can't seem to get a preview of my site with images unless I'm using Workspaces.
7 Answers
José Manuel Martínez López
18,133 PointsDo you have your project files stored in your computer?
Paul Jackson
8,943 PointsYes, everything is on my computer
José Manuel Martínez López
18,133 PointsTry removing your img folder.
José Manuel Martínez López
18,133 PointsIf that does not make the trick add some padding.
Paul Jackson
8,943 PointsI'm sorry... I'm not understanding what you mean when you say remove my img folder?
And what would padding do?
José Manuel Martínez López
18,133 PointsAdd padding to your body id.
Paul Jackson
8,943 PointsI figured it out. Thanks though.