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
Steef Vendy
9,436 PointsBigger pop up display
Hi wonderful people, after following Nick's tutorial in his files, I had no problem in changing from jpg files to svg files. the weird things happen after I tested it out in my website.
in the example provided when he changes:
<a href="img/numbers-01.jpg" class="magnific">
<img src="img/numbers-01.jpg" alt="">
<p>Experimentation with color and texture.</p>
</a>
to
<a href="img/numbers-01.jpg" class="magnific">
<img src="assets/numbers-01-preview.jpg" alt="">
<p>Experimentation with color and texture.</p>
</a>
I noticed he doesn't change the
<a href="img/numbers-01.jpg" class="magnific">
he only changes
<img src="assets/numbers-01-preview.jpg" alt="">
When I did the same to my own files, suddenly the pop up display stopped working. it couldn't find the images. It only worked when I changed the
<a href ="">
to where the assets folder is. anyone know why?
I also noticed my pop up images are little smaller than Nick's images even tho my files and resolutions bigger. Please have a look at: http://www.thesite.site for reference.
1 Answer
Manish Bhan
553 Pointswhen u click (assets/numbers-01-preview.jpg) image or paragraph, does it pop this (img/numbers-01.jpg) image
Steef Vendy
9,436 PointsSteef Vendy
9,436 PointsHi Manish, Yes it does. sorry to get you confused. okay so here is the example file that works fine.
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Nick Pettit | Designer</title> <link rel="stylesheet" href="css/normalize.css"> <link href='http://fonts.googleapis.com/css?family=Changa+One|Open+Sans:400italic,700italic,400,700,800' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="css/main.css"> <link rel="stylesheet" href="css/responsive.css"> <link rel="stylesheet" href="css/magnific-popup.css"> <script src="js/jquery-2.1.3.js"></script> <script src="js/jquery.magnific-popup.min.js"></script> <script src="js/app.js"></script> </head> <body> <header> <a href="index.html" id="logo"> <h1>Nick Pettit</h1> <h2>Designer</h2> </a> <nav> <ul> <li><a href="index.html" class="selected">Portfolio</a></li> <li><a href="about.html">About</a></li> <li><a href="contact.html">Contact</a></li> </ul> </nav> </header> <div id="wrapper"> <section> <ul id="gallery"> <li> <a href="img/numbers-01.jpg" class="magnific"> <img src="assets/numbers-01-preview.jpg" alt=""> <p>Experimentation with color and texture.</p> </a> </li> <li> <a href="img/numbers-02.jpg" class="magnific"> <img src="assets/numbers-02-preview.jpg" alt=""> <p>Playing with blending modes in Photoshop.</p> </a> </li> <li> <a href="img/numbers-06.jpg" class="magnific"> <img src="assets/numbers-06-preview.jpg" alt=""> <p>Trying to create an 80's style of glows.</p> </a> </li> <li> <a href="img/numbers-09.jpg" class="magnific"> <img src="assets/numbers-09-preview.jpg" alt=""> <p>Drips created using Photoshop brushes.</p> </a> </li> <li> <a href="img/numbers-12.jpg" class="magnific"> <img src="img/numbers-12.jpg" alt=""> <p>Creating shapes using repetition.</p> </a> </li> </ul> </section> <footer> <a href="http://twitter.com/nickrp"><img src="assets/twitter-wrap.svg" alt="Twitter Logo" class="social-icon"></a> <a href="http://facebook.com/nickpettit"><img src="assets/facebook-wrap.svg" alt="Facebook Logo" class="social-icon"></a> <p>© 2014 Nick Pettit.</p> </footer> </div> </body> </html>
And here is my file that didn't work:
<!DOCTYPE html> <html>
<head> <meta charset="utf-8"> <title>The Site.site</title> <link rel="stylesheet" href="css/normalize.css"> <link href='http://fonts.googleapis.com/css?family=Nunito:400,300' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="css/main.css"> <link rel="stylesheet" href="css/responsive.css"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="css/magnific-popup.css"> <script src="js/jquery-2.1.3.js"></script> <script src="js/jquery.magnific-popup.min.js"></script> <script src="js/app.js"></script>
</head>
</html>
I had to change
<a href="img/borobudur_web.jpg" class="magnific"> <img src="assets/borobudur_web.jpg" alt=""> <p>Borobudur - Central Java - Indonesia</p> </a>
to:
<a href="assets/borobudur_web.jpg" class="magnific"> <img src="assets/borobudur_web.jpg" alt=""> <p>Borobudur - Central Java - Indonesia</p>
to get it works here is the code I tweaked.
<!DOCTYPE html> <html>
<head> <meta charset="utf-8"> <title>The Site.site</title> <link rel="stylesheet" href="css/normalize.css"> <link href='http://fonts.googleapis.com/css?family=Nunito:400,300' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="css/main.css"> <link rel="stylesheet" href="css/responsive.css"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="css/magnific-popup.css"> <script src="js/jquery-2.1.3.js"></script> <script src="js/jquery.magnific-popup.min.js"></script> <script src="js/app.js"></script>
</head>
</html>
Yet the pop up image is not as large as it intended to be, I wonder how to resize it