WebArtz - The Web Design Forum
Welcome to WebArtz, Guest!

WebArtz is a nice place for discussions related to web designing and coding. We help our members to code their own website templates with HTML and CSS. We give them advice on various issues.

To know more about WebArtz Forum, visit the About Us page.

At the moment, you are viewing the forum as a guest. As a guest you can't make post and participate in discussions. You need to register and become a member of the forum. Click the register link below and become a part of this forum.

Thank You

WebArtz - The Web Design Forum
Welcome to WebArtz, Guest!

WebArtz is a nice place for discussions related to web designing and coding. We help our members to code their own website templates with HTML and CSS. We give them advice on various issues.

To know more about WebArtz Forum, visit the About Us page.

At the moment, you are viewing the forum as a guest. As a guest you can't make post and participate in discussions. You need to register and become a member of the forum. Click the register link below and become a part of this forum.

Thank You


You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

1Accespted Border on Hovering over an Image Sat Feb 13, 2010 1:01 am

Sanket

Sanket
Administrator
Administrator
Border on Hovering over an Image
Border on Hovering over an image

Hello Everyone Very Happy

This is a tutorial to make multiple clickable images to have a border on hover. It gives a nice effect to the image.

We can use this to highlight just one image if we want to. But in this tutorial we will play around with 6 images to make it look better.

Enter this code into your HTML Page.

Code:
There was a missing # in the 2nd color. Its fixed now. Here is the complete page code.

With the above code we make the 6 images look as though they are in a table. Remember i have used same size images, using different size images would not have a similar effect as shown.

Border on Hovering over an Image 20tm077

Since now you have seen the demo, you will see that there is already a light border around the image. When you hover over the images you see a red border instead of the light border.

We have defined those borders via CSS.
As you can see in the style tags

#ccc Defines the Light Border
#FF3300 Defines the Red border
You can change these colors to whatever you want.

The rest of the html code is the normal code which we generally use.

Thank you Smile

Notice : This tutorial is copyrighted by WebArtz Forum. You may not publish it on anywhere without written permission from the administrators.



Last edited by Sanket on Sun Oct 24, 2010 3:57 pm; edited 1 time in total

http://www.webartzforum.com

2Accespted Re: Border on Hovering over an Image Sat Feb 13, 2010 5:39 am

MrMega

MrMega
Registered Member
Registered Member
Nice, I used this tutorial on fuji planet Very Happy
Great job sanket!

3Accespted Re: Border on Hovering over an Image Sat Feb 13, 2010 11:33 am

Sanket

Sanket
Administrator
Administrator
Thanks.

Nothing better than your written tutorials being used by someone cheers

Can i see exactly where you used it on fuji planet?

http://www.webartzforum.com

4Accespted Re: Border on Hovering over an Image Sat Feb 13, 2010 5:34 pm

micro1000


Registered Member
Registered Member
great tutorial

5Accespted Re: Border on Hovering over an Image Sun Feb 14, 2010 12:15 am

MrMega

MrMega
Registered Member
Registered Member
Sanket, I used it on the homepage message, where there is "Fuji" in the image with a heart around it.
I messed around with the code a little bit, so it doesn't have to be clickable to another link anymore. This is my code:

Code:
<style>.highlight img{
border: 1px solid #ccc;
}

.highlight:hover img{
border: 1px solid #FF3300;
}

.highlight:hover{
color: red; /*** Dummy definition to remove IE bug ***/
}</style>

<script type="text/javascript">
function show_alert()
{
alert("hehe...valentine's week is coming to the forum ...");
}
</script>
<a class="highlight title="love is in the Fuji Planet air...">
<img src=http://i17.servimg.com/u/f17/13/87/07/92/love10.png border= none onclick="show_alert()" value="Show alert box" />

6Accespted Re: Border on Hovering over an Image Mon Feb 15, 2010 10:20 am

karna

karna
Registered Member
Registered Member
Thats nice sanket.
I can now add cool border effect on my images ^^

7Accespted Re: Border on Hovering over an Image Mon Feb 15, 2010 8:36 pm

Jophy

Jophy
Registered Member
Registered Member
Wow Cool! I'll try this to my test forum... Thanks Sanket. Very Happy

http://www.socialtechforum.com/

8Accespted Re: Border on Hovering over an Image Sat Oct 23, 2010 7:00 pm

Fred100

Fred100
Registered Member
Registered Member
Hey sanket ,
One problem...a major one.
I tried out your tutorial and it didn't worked for me , dunno why. So , I copied and pasted the exact code to my test forum and this was the result.
http://tsktsktest.forumotion.com/Bababababa-h1.htm
It ain't working :/
Where, the one by mega worked!
Yours just brought up a ugly border for me...
https://i.servimg.com/u/f29/13/89/47/62/210.png

http://www.art-castle.biz/forum.htm

9Accespted Re: Border on Hovering over an Image Sun Oct 24, 2010 11:13 am

Fred100

Fred100
Registered Member
Registered Member
Sanket , can you still help me out on this?

http://www.art-castle.biz/forum.htm

10Accespted Re: Border on Hovering over an Image Sun Oct 24, 2010 3:57 pm

Sanket

Sanket
Administrator
Administrator
There was a missing # in the 2nd color. Its fixed now. Here is the complete page code.
Code:
<html>
<head>
<style>.highlight img{
border: 1px solid #ccc;
}

.highlight:hover img{
border: 1px solid #FF3300;
}

.highlight:hover{
color: red; /*** Dummy definition to remove IE bug ***/
}</style>
</head>

<body>
<div align="center">
<a href="http://hitskin.com" class="highlight" target="_blank" title="A"><img src=http://i45.tinypic.com/mwyzih.jpg border= none ></a><a href="http://hitskin.com" class="highlight" target="_blank" title="B"><img src=http://i48.tinypic.com/21bm9oz.jpg border= none ></a><a href="http://hitskin.com" class="highlight" target="_blank" title="C"><img src=http://i45.tinypic.com/23rp95e.jpg border= none></a><br>
<a href="http://hitskin.com" class="highlight" target="_blank" title="D"><img src=http://i45.tinypic.com/2qcov28.jpg border= none ></a><a href="http://hitskin.com" class="highlight" target="_blank" title="E"><img src=http://i46.tinypic.com/1194bux.jpg border= none ></a><a href="http://hitskin.com" class="highlight" target="_blank" title="F"><img src=http://i45.tinypic.com/ab2eci.jpg border= none ></a>
</div>

</body>
</html>

http://www.webartzforum.com

11Accespted Re: Border on Hovering over an Image Sun Oct 24, 2010 4:06 pm

Fred100

Fred100
Registered Member
Registered Member
Oh thank goodnes!
It finally worked!
Thanks a ton sanket!

http://www.art-castle.biz/forum.htm

Sponsored content


View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum