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
Ilya Levtov
Courses Plus Student 183 Pointswhy is Preview showing 5 images when we only coded reference to 1 (img/numbers-01.jpg)?
at end of video: "Add Image Gallery Content" we inserted reference to 1 picture. but after save and preview, i'm seeing 5 images, and captions as well.
4 Answers
Kristen Law
16,244 PointsJudging by the code you posted, I don't see any reason why there would be 5 images and captions showing up. Did you try refreshing the webpage you are previewing?
I'm not sure if you just got the video titles mixed up, but at the end of the video "Add Image Gallery Content", Nick has also added the other images and captions. Did you follow along in that video and add the same code? Or are you referring to the "Structure Your Image Gallery" video? If you are seeing 5 images and captions and you followed the "Add Image Gallery Content" to the end of the video, your HTML code should look something like this:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Nick Pettit | Designer</title>
</head>
<body>
<header>
<a href="index.html">
<h1>Nick Pettit</h1>
<h2>Designer</h2>
</a>
<nav>
<ul>
<li><a href="index.html">Portfolio</a></li>
<li><a href="about.html">About</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</nav>
</header>
<section>
<ul>
<li>
<a href="img/numbers-01.jpg">
<img src="img/numbers-01.jpg" alt="">
<p>Experimentation with color and texture.</p>
</a>
</li>
<li>
<a href="img/numbers-02.jpg">
<img src="img/numbers-02.jpg" alt="">
<p>Playing with blending modes in Photoshop.</p>
</a>
</li>
<li>
<a href="img/numbers-06.jpg">
<img src="img/numbers-06.jpg" alt="">
<p>Trying to create an 80's style of glows.</p>
</a>
</li>
<li>
<a href="img/numbers-09.jpg">
<img src="img/numbers-09.jpg" alt="">
<p>Drips created using Photoshop brushes.</p>
</a>
</li>
<li>
<a href="img/numbers-12.jpg">
<img src="img/numbers-12.jpg" alt="">
<p>Creating shapes using repetition.</p>
</a>
</li>
</ul>
</section>
<footer>
<p>© 2014 Nick Pettit.</p>
</footer>
</body>
</html>
Kasim Khan
4,925 PointsHey, please can you show your code by inserting 3 backticks ``` followed by your code.
Thanks
Ilya Levtov
Courses Plus Student 183 Points<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Ilya Levtov | Co-founder</title>
</head>
<body>
<header>
<a href="index.html">
<h1>Ilya Levtov</h1>
<h2>Co-founder</h2>
</a>
<nav>
<ul>
<li><a href="index.html">Portfolio</a></li>
<li><a href="about.html">About</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</nav>
</header>
<section>
<ul>
<li>
<img src="img/numbers-01.jpg" alt="">
</li>
</ul>
</section>
<footer>
<p>© 2014 Ilya Levtov.</p>
</footer>
</body>
</html>
Ilya Levtov
Courses Plus Student 183 Pointsthanks. i agree i don't understand why. i have never coded the other images or captions. i closed all windows, reopened workspace, i see only the code i wrote / sent to you, but when i hit Preview, i get all the images with all the captions. i will send a screenshot to support in a minute.
Re: the different video titles. that could be a mix up on my end. i am logged in on 2 computers, am trying to watch video on 1 and do the work on the other. it is not smooth :)
still, there's no way my workspaces Preview should be showing workspace code i have never written.....
Ilya
Kristen Law
16,244 PointsDid support get back to you? Have you tried refreshing the previewed webpage? I have had to refresh it sometimes in order for it to display correctly. What browser are you using?