473,385 Members | 2,014 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Set hyperlink to image class??

1
Hello Guys,

Is there any way I can set hyperlink to a image which is in image class in css?

for ex.
I have this

<div class="thumbnail"><a href="/test/test1.php"><img src="/images/covers/test.jpg" alt="test" class="bkmrk" /></a>

and here is my css file

.thumbnail {
float: left;
width: 20%;
text-align: center;
margin-bottom: 20px;
}

.thumbnail img {
height: auto;
width: 95%;
max-width: 150px;
padding-top: 20px;
}

.thumbnail .bkmrk {
background: url(/images/gold-bookmark.png) no-repeat 15px top;
}

and my output is

http://i45.tinypic.com/xpar1c.png

is there any way I can set an hyperlink to this gold-bookmark.png image.. when i click on gold-bookmark.png it should take me somewhere (for ex. google.com) and when i click on actual test.jpg it should take me to /test/test.php.. It seems impossible to me.. let me know if you have any solutions how to do it.. I am willing to do any necessary changes since output will be the way I want..


thank you
Aug 17 '12 #1
2 2444
Rabbit
12,516 Expert Mod 8TB
I'm not sure what you're getting at. You don't need any CSS to make an image act like a hyperlink. You already have the HTML for that.
Aug 17 '12 #2
ariful alam
185 100+
in a div create two div vertically. set first inner div's height 15% that contain the golden ribbon image and second inner div's height to 85% that contain the actual image. so, you can add individual link to both the image.
Aug 17 '12 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Kurt | last post by:
Hi All, I'm just getting started rewriting a small CAD/GIS like application for designating outlines of objects in photographs/images in Python. Is there a class out there that already handles...
8
by: JLahm | last post by:
I have defined a class for my images called .image that specifies the default border color, width and style. I'd like to be able to have the pseudo elements link, visited and active have one color...
6
by: QuasiChameleon | last post by:
Hi, I'm trying to create a grayscale image class that reads and writes grayscale Targa format. This works well with smaller images, but corrupts larger images and creates a "Segmentation fault...
3
by: Marcin Kowalewski | last post by:
Hi I've got a stupid problem with code below : using System; using System.Drawing; .... public class CsrcImage :Image { public CsrcImage() { //
2
by: Volly | last post by:
Helo ! I want write console application and I want to reuse my old class, but inside it is used Image class (and System.Drawing.Imaging namespace). I can't complile it. The error is: The...
1
by: graphicsxp | last post by:
Hi, To have a hyperlink image in my gridview I do this : <asp:TemplateField> <ItemTemplate> <a href="ViewCutting.aspx?CuttinID={0}" ><img src="App_Themes/close.gif" alt="" style="border:0px"...
0
by: cps_farzin | last post by:
I am using ASP.Net and C# in development of my webapp. I want to user hyperlink <a href=...as link but when I do, I loose the finger pointer on mouse over. How do I get that back? Any ideas?!...
0
by: Corey Ellsworth | last post by:
I have coded a class that uses the bitmap class to generate graphics from True Type fonts. I'm using it primarily to render 3 of 9 barcodes from a True Type font. When the exact same code is used...
1
by: kenneth6 | last post by:
Give me some help, pls!! I am doing an image processing project. I decide to import some prepared binary images (in binary BMP format) into the resources sections of a MFC C++ project. The...
1
by: sop23456 | last post by:
Microsoft Access 2003 I have hyperlink the image/picture to another file. When I click on the hyperlink, the image appears using MS Paint. What do I do to view Image/picture in Windows Picture...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.