Saturday, July 9, 2011

Create Eye Catching Image Pop Ups using CSS and HTML


This is a neat way to show off your sponsors or affiliates using CSS and HTML. The image will enlarge on hover and can also be linked to your affiliate accounts or any other web page for that matter. Because we will be using a stylized list; there's no need to worry about cropping images or resizing your images. You'll be able to style your list using CSS; making it neater and quicker to implement your styling power on all images at once. 

Before you begin the tutorial; make sure to back up your current existing template in case it doesn't turn out as expected. 

Begin by logging into your Blogger dashboard > Design > Page Elements. Once your on the "Page Elements" page, select "Add a Gadget" to add an "HTML/JavaScript" gadget.  The next step is to copy and paste the following snippet code below into your configuration box.
  <ul class="thumb">
    <a href="LINK-ADDRESS"><li><img src="http://YOUR-IMAGE-LINK.jpg" alt="" style="border: 0;" width="125" height="125" /></li></a>
    <a href="LINK-ADDRESS"><li><img src="http://YOUR-IMAGE-LINK.jpg" alt="" style="border: 0;" width="125" height="125" /></li></a>
    <a href="LINK-ADDRESS"><li><img src="http://YOUR-IMAGE-LINK.jpg" alt="" style="border: 0;" width="125" height="125" /></li></a>
</ul>
Note: The above code contains 3 advertisement box. If you want to add more, simply copy and paste: <a href="LINK-ADDRESS"><li><img src="http://YOUR-IMAGE-LINK.jpg" alt=" " style="border:0;" width="125" height="125"/></li></a> right before the closing </ul> tag.

The next step now is to style your images. To do this, simply add the following CSS snippet code to the opening of your head section.
<style type='text/css'>    
ul.thumb {
    float: left;
    list-style: none;
    margin: 0; padding: 10px;
    width: 360px;
}
ul.thumb li {
    margin: 0; padding: 5px;
    float: left;
    position: relative;
    width: 110px;
    height: 110px;
}
ul.thumb li img {
    width: 100px; height: 100px;
    border: 1px solid #ddd;
    padding: 5px;
    background: #f0f0f0;
    position: absolute;
    left: 0; top: 0;
    -ms-interpolation-mode: bicubic;
}
ul.thumb li img.hover {
      border: none;
}
</style>
Note: You can change the style of your images with this CSS snippet code. If you need help stylizing your list, please don't hesitate to leave a comment and ask for help. 

1 comment:

  1. hmmm...
    i think there's any error code my bos!!!
    i don't ever seen before with this attribute
    -ms-interpolation-mode: bicubic;
    and what is this!!!
    ul.thumb li img.hover {
    border: none;
    }
    that's false...
    do you mean img.hover = img:hover
    and what effect result use border: none!!!

    i think you want to do this!!!

    ul.thumb li img:hover {
    -moz-transform:scale(1.5);
    -webkit-transform:scale(1.5);
    -o-transform:scale(1.5);
    }

    ReplyDelete