• 0

Simple Question


Question

I'm working on a "menus" page for a restaurant and I am trying to get it to have 3 thumbnails, then when you click on a big it brings you to another page with just the picture but it's normal size. What code would I need to do this with my own hosting so I don't have to use like, tinypic or anything? I've already uploaded the images in my "image" folder. Any help?

-Thanks

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

<a href="blacksmiths.jpg"><img src="blacksmiths2.jpg" border=6 height=250 width=250 alt="View of the Blacksmiths Shop"><p>

Change the location and image name to your own, first .jpg is thumbnail, second is location and name of bigger picture

Link to comment
Share on other sites

  • 0

<a href="blacksmiths.jpg"><img src="blacksmiths2.jpg" border=6 height=250 width=250 alt="View of the Blacksmiths Shop"><p>

Change the location and image name to your own, first .jpg is thumbnail, second is location and name of bigger picture

You don't need both a thumbnail and a large version to do this. The easier way:

<a href="gourmetpizza.jpg"><img src="gourmetpizza.jpg" width="190px" height="190px" alt="Click to see larger version" /></a>

The problem with this method is that the end user will end up loading the larger image just to have it sized down, which may cause a slow page load. The benefit, however, is that you don't need to create a thumbnail manually.

Hope this helps!

-- unintentional;)

Link to comment
Share on other sites

  • 0

Alright. Here is the code I used.

&lt;div id="images"&gt;
	&lt;a href="CCF03252010_00000(2)tn.jpg"&gt;&lt;img src="CCF03252010_00000(2)tn.jpg" height=250 width=250 alt="test"&gt;
&lt;a href="lunch_menu.jpg"&gt;&lt;img src="lunch_menutn.jpg" height=250 width=250 alt="test"&gt;
&lt;a href="tchops specials.jpg"&gt;&lt;img src="tchops specialstn.jpg" height=250 width=250 alt="test"&gt;

and if you go to www.tchops.net/menus.html the pictures dont show up. Why is this? I have the thumbnails and images in my "images" folder.

Link to comment
Share on other sites

  • 0

Its a path issue. The src for the images should be 'images/lunch_menutn.jpg' instead of just 'lunch_menutn.jpg'.

For the menu you could also have a gallery of thumbs and one big image by the side. You can change this big image based on the thumb the viewer hovers/clicks on. This can be done using js and is not very hard to do. Just a suggestion.

Link to comment
Share on other sites

  • 0

Timthumbs would be perfect to just generate a thumbnail for you (versus needing to do it for every image you want a thumbnail of.)

http://www.darrenhoyt.com/2008/04/02/timthumb-php-script-released/

http://code.google.com/p/timthumb/

That way you're not forcing a large image to load only for it to be horribly resized. It will distort it entirely this way and increase load time.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.