I have an image floating on the left side of the screen. Link can be seen here (www.mibsolutionsllc.com/proc_dev). How can I make that image a link? What is the terminology so I can research it on Google for answer? Any help is greatly appreciated.
+1
A:
The best way will be to use an anchor tag.
<a href="yourfilepath"><img src="imagepath" /></a>
rahul
2009-09-11 13:45:16
+2
A:
Unless I am misunderstanding your question...to make a link you have to surround the img tag with a tags.
<a href="url.html">
<img src="".../>
</a>
Vincent Ramdhanie
2009-09-11 13:45:35
If you view the url you will see that the image is in a css div and floating on the side of the page. I guess I just wrap that css div as an a link?
HollerTrain
2009-09-11 13:54:03
Do you mean that you do not have an img tag?
Vincent Ramdhanie
2009-09-11 14:11:33
it is being called via css. it is in a css div floating on the left side of the screen always in the middle of the screen
HollerTrain
2009-09-11 14:26:01
+1
A:
While wrapping your in an might work, I don't think you're allowed to put block-level elements inside an (like you suggest on Vincent Ramdhanie's answer). Because of that, I would recommend this:
<div class="sidebox">
<a href="http://example.com">
</a>
</div>
Then, for your styles:
div.sidebox {
width: 100px;
height: 100px;
}
div.sidebox a {
display: block;
width: 100px;
height: 100px;
}
The width and height for the and the should both be the same for this to work.
Alan
2009-09-11 16:06:21
On second thought, the width and height properties for "div.sidebox a" might only need to be 100%, and not an absolute measurement. You may want to experiment with that.
Alan
2009-09-11 16:27:50