Lunarpages Web Hosting Forum

Author Topic: Please help with gallery  (Read 1919 times)

Offline belyn

  • Trekkie
  • **
  • Posts: 12
Please help with gallery
« on: May 23, 2012, 10:45:20 AM »
Hi there,

I am a complete beginner with HTML, CSS, etc.  I have managed to put together a website with a very basic gallery but I'd like to jazz it up a little bit.  I want to be able to click on one of the thumbnails and, once it's open, have arrows/buttons that allow one to go forward and backward in each gallery.  I have been researching it online for the last week but I can't seem to find anything to work with my pages.  As I said, I am a complete beginner, so I am probably missing the most obvious solution.

If anyone could tell me which html code to put in my index page or CSS, I would greatly appreciate it.  I would like to use it on the galleries of http://www.bannister-weimann.com.  

Also, maybe someone knows the answer to this...  When I click on one of my gallery pictures in Firefox, it opens in the middle with a dark gray background.  When I open it in Opera, it's a white background.  In IE, it's a white background, but the picture is all the way to the left, not centered.  Does anyone know how I can make this the same for all 3 browsers (centered with, preferably, a black background)?  

Thanks so much for any help!

« Last Edit: May 24, 2012, 06:06:00 AM by belyn »

Offline MrPhil

  • Senior Moderator
  • Berserker Poster
  • *****
  • Posts: 6424
Re: Please help with gallery
« Reply #1 on: May 23, 2012, 11:25:01 AM »
I am a complete beginner with HTML, CSS, etc.  I have managed to put together a website with a very basic gallery but I'd like to jazz it up a little bit.  I want to be able to click on one of the thumbnails and, once it's open, have arrows/buttons that allow one to go forward and backward in each gallery. 

Have you considered using any of the prewritten gallery applications, including those offered on Fantastico or Softaculous? That might be easier than rolling your own.

Quote
Also, maybe someone knows the answer to this...  When I click on one of my gallery pictures in Firefox, it opens in the middle with a dark gray background.  When I open it in Opera, it's a white background.  In IE, it's a white background, but the picture is all the way to the left, not centered.  Does anyone know how I can make this the same for all 3 browsers (centered with, preferably, a black background)? 

When you click on a thumbnail image (the small one), all you're doing is linking to the full size image. This leaves how to display the image (background and screen position) up to the discretion of the browser, and your three browsers choose to do it three different ways. Firefox appears to be using something similar looking to "lightbox" systems, for best appearance. The others just use the default white background.

What you're going to have to do is link to a full page of HTML code, where you can control the background color and position of the image. While you're at it, you can add navigation buttons to go forward/backwards and up (return to menu) as a set of links with small image icons. Rather than writing a page from scratch for each picture in the gallery, you'd be better off using a scripting language such as PHP to generate the HTML code. That way, there is just one image display page code to maintain. For a real gallery, you probably want a PHP script to handle the thumbnails, too, and scroll through them with predictable and consistent navigation. Finally, you would want to be able to store images by subject matter and name ("reddish_cat_side_view.jpg") rather than some numbered system. This can best be done with a database, but PHP could read a flat file just as well, if it's not going to change all that often. All of this is why I suggest you integrate a gallery with your site.
Visit My Site

E-mail Me
-= From the ashes shall rise a sooty tern =-

Offline belyn

  • Trekkie
  • **
  • Posts: 12
Re: Please help with gallery
« Reply #2 on: May 24, 2012, 06:06:33 AM »
I went ahead and used Picasa for the gallery.  Thanks for answering.