Using Bootstrap3, I am trying to make a page with few thumbnails leading to different links. I have figured out how to make hover effect with text and link but now I am confused how it can be used with mobile and tablet as there is no hover for those.
I am wondering how to make the entire thumbnail clickable? and is it a good idea to make it so?
Here is a bootply link for you to see what I mean http://www.bootply.com/OuUBXv4ope
How To Create A Clickable Image In HTML? The <img> and the <a> tags together is the most common way of adding a clickable image link in HTML. In a webpage, after adding an image using the <img> tag, make it clickable by adding a <a> tag along with it.
Bootstrap helps web developers to create thumbnails that are used to show linked images in grids with the pre-defined classes which help to reduce codes length. Thumbnails are created to provide a quick preview of images with small images. Thumbnail Image: A thumbnail is a small image that represents a larger image.
Making the entire thumbnail clickable is a good idea in terms of user accessibility and in fact, easy to make.
According to your code:
<div class="col-sm-4">
<div class="thumbnail">
<!-- Place the anchor tag here to cover both your caption and image -->
<a href="#" class="">
<div class="caption">
<h4 class="">Thumbnail Headline</h4>
<p class="">Lorem ipsum dolor
</p>
</div>
<img src="http://lorempixel.com/400/300/technics/1/" alt="..." class="">
</a>
<!-- Anchor tag ends covering both image and caption -->
</div>
</div>
DEMO (The first 3 thumbnails)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With