Nov 15

There are many ways to create an online image gallery. There are applications you can buy, or PHP, or Java galleries. However, CSS is a great and cheap way of doing this, and you know it will work across all browsers.

I will be using Dreamweaver CS3 in this tutorial.

Seeing as we’re using CSS, making all your images a standard size will help greatly. So think beforehand about how big you would like your images, both the thumbnails and the large image. I will personally be using a thumbnail of 90x90px, and a large size of about 500x375px.

  1. First, create a folder with all your images ready, both large and small. Edit your images to the correct sizes, and make your thumbnails with the same name, but have something like tn on the end, or an identifying mark.
  2. Next create a new HTML document, and make sure its XHTML 1.0 Transitional. New>HTML>None>Create, then choose your font and size, preferably something like Georgia as its nice and clear, and 14px font. You can do this by going to Modify>Page Properties
  3. The images both large and small are to be contained in a Div tag within the Body. Go to Insert>Layout Objects>Div Tag. Then click New CSS Style, choose Advanced then give it a name of something like: #container and Define in: This Document Only. Next select the Box Category, and define the size of about 600x475px.
  4. The images are going to go into a Unordered List. So the container should look like
    <div id=”container”><ul></ul></div>.
    Next we need to start our lists. So open your <li></li> and close it. Your code should look like:
    <div id=”container”><ul>
    <li><img src=”images/canyon.jpg” alt=”Canyon” tile=”Canyon” /><br />
    This will be your text for the image should be placed.
    </li></ul></div>

    Repeat the list tags to include all images in your gallery, eg:
    <li><img src=”images/canyon.jpg” alt=”Canyon” tile=”Canyon” /><br />
    This will be your text for the image should be placed.
    </li>
    <li><img src=”images/moon.jpg” alt=”Moon” tile=”Moon” /><br />
    This will be your text for the image should be placed.
    </li>
  5. Next we need to make the images into links, with a unique class tag, eg photoa, photob and so on. To do this, place: <a class=”gallery photos” href=”#”> so your code should look like:
    <li><a class=”gallery photoa” href=”#”>
    <img src=”images/canyon.jpg” alt=”Canyon” tile=”Canyon” /><br />
    This will be your text for the image should be placed.
    </a></li>
    .
    Finally we will need to link the Text and Images together, to do this we use a <span> tag, eg:
    <li><a class=”gallery photoa” href=”#”><span>
    <img src=”
    images/canyon.jpg” alt=”Canyon” tile=”Canyon” /><br />
    This will be your text for the image should be placed.
    </span></a></li>
  6. Now is a good time to remove bullets and indentation. Add this code in-between the style tags in your header:
    #container ul {
    padding: 0;
    margin: 0;
    list-style-type: none;
    }
  7. At it’s present form all the images display, this is needed so that they pre-load. However they need to be hidden so that they only appear on roll over. This is done by placing them in a container that is 1x1px. This will only display the top left pixel of each image. Add the following code to your style tag:
    #container a.gallery span {
    position: absolute;
    width: 1px;
    height: 1px;
    top: 5px;
    left: 5px;
    overflow: hidden;
    background: #fff;
    }

    The Page should effectively be blank now, except for a small dot on the top left.
  8. It’s time to start adding the thumbnail images. Add the following code to you style tag again:
    #container a.gallery, #container a.gallery:visited {
    display: block;
    color: #000;
    text-decoration: none;
    border: 1px solid #000;
    margin: 1px 2px 1px 2px;
    text-align: left;
    cursor: default;
    }

    Now all images need to be defined in the style tags to display the thumbnails, to do this add:
    #container a.photoa {
    background: url(
    images/canyon-tn.jpg);
    height: 90px;
    width: 90px;
    }
  9. Now that the thumbs have been put in place its time to organise them. Simply add:
    #container ul {
    width: 100px;
    height: 380px;
    }
    #container li {
    float: left;
    }

    The width and height here should be changed depending on the amount of thumbnails that you wish to display. I have 4 and displaying 1 after the other down the side, so i have 100px width, if i incresed it to 200px it would display 2 lists running down the side. The height i have used is to fit in the 4 running down.
  10. Next add another bit of CSS into the style tags:
    #container a.gallery:hover span {
    position: absolute;
    width: 500px;
    height: 375px;
    top: 10px;
    left: 170px;
    color: #000;
    background: #fff;
    }

    This code will apear when the mouse is placed over a thumbnail, then the main image will apear. Width and height should be the same dimensions as the main image. Top and left define how many pixels away from the top and left of the page it sits, adjust these till you are happy.
  11. Finally add a border to the thumbnails when you hover over them, simplay add:
    #container a.gallery:hover {
    border: 1px solid #fff;
    }

Hope you enjoyed, and here are the source files… Source

Nov 11

The iPhone Firmware 2.2 Beta 2 download was made available to developers, and with it comes some nice features. Some were a waste of time, some were alright…

The main thing so far is that there will be an overhaul of the iPod, which will let you download podcasts from your iPhone. This will be 10MB or less via your carrier, or if its bigger via your Wifi. This would explain why Apple rejected the Podcaster app last month, which offered the same thing. Seems Apple does not want competition.

Along with the iPod update, there will be Google Street View. Useful, I’m sure. I’m still waiting for when I can sit at work, log on, and check whether I left the iron plugged in. Also included in the Google update is Public Transport, so you can plan your journey from A to B, without having to go via C, D and E. Very useful.

If you ever needed to tell someone where you were, but didn’t know yourself, well now you can. Sound crazy? With Google Maps, you can send your location to anyone else. When you click the send location button, it attaches your location into a email and sends it on. This can be useful when meeting someone, and you both swear your on the right corner, but one of you can’t read your road signs. So send your location to your buddy.

Another thing added is Emoji. Emoji are picture characters that are very popular in the Japanese mobile market. They basically look like smileys or emoticons. Cute.

There is now an option to disable Auto-Correction on your iPhone. Along with this, when you delete an app, a pop up asks you to rate it first.

Also there is a refresh of Safari (nothing fancy, just a face lift). It’s not like redesigning Safari was high on my list of things I’d change or add. In fact, I don’t even think its on anyone’s list. But redesign it they did. There’s no more little magnifying glass icon at the top of the page. Instead, the address bar is shifted over and shrunk, and the search bar sits alongside it. Oh, and the refresh button becomes part of the address bar.

Yet, besides all of this, there is still no Copy & Paste, and no support for MMS! Unless, of course, you’re using Jailbreak. There is a great site called PleaseFixTheiPhone, where it’s open to the public to get a response for features they want.

Emoji Icons New Safari Look for iPhone/iPod Touch Podcast Download on iPhone/iPod Touch Rate App Google Public Transport Schedule Google Public Transport Times Google Street View

Nov 03

Windows Vista Service Pack 2 is on its way. There were a handful of beta testers it was sent to. If you’re not a beta tester and would like to download it, here is the file: Vista SP2. All you need to do is unzip and run it from your desktop. It will edit 2 registry files, and you can download Vista SP2 via Windows Update.

Just be aware – there will likely be some bugs that could cause problems with your system. And for some reason, it’s preset to expire early 2010. You will also find an “Evaluation copy” message defacing your desktop wallpaper. There is a way to get rid of it and the expiration date too – but you’ll have to uninstall Vista SP. It’s not a bad update, but it’s important to know what you’re getting into before you try to install it.

So what’s new in Vista SP2?

  • Windows Vista SP2 adds Windows Search 4.0 for faster and improved relevancy in searches.
  • Windows Vista SP2 contains the Bluetooth 2.1 Feature Pack supporting the most recent specification for Bluetooth Technology.
  • Ability to record data on to Blu-Ray media natively in Windows Vista.
  • Adds Windows Connect Now (WCN) to simplify Wi-Fi Configuration.
  • Windows Vista SP2 enables the exFAT file system to support UTC timestamps, which allows correct file synchronization across time zones.

Windows Vista SP2 is expected to be released in final form sometime in the first half of 2009. Judging by the expiration date of Vista SP2 Beta, I’d say that sounds about right.