Yes, you can do it. But, you need a little bit of JavaScript here.
Here I am giving you a similar code which you have written above.
<html>
<head>
<script>
function display(imgElement){
document.getElementById('displayimg').setAttribute('src',imgElement.getAttribute('src'));
}
</script>
<style>
#display{
border:solid 1px blue;
width:90%;
height:60%;
margin:auto;
}
#select{
padding:10% 1% 1% 1%;
width:95%;
height:25%;
mrgin:auto;
}
#display img{
border:solid 1px red;
width:100%;
height:100%;
}
#select img{
border:solid cyan 1px;
floatLleft;
width:50px;
height:25px;
}
#select a{
border:solid green 1px;
}
#select a:hover,a:active{
border:solid yellow 1px;
}
</style>
</head>
<body>
<div id="display">
<img id="displayimg">
</div>
<div id="select">
<img id="selectimg" src="D:\D drive\147266.png" onclick='javascript:display(this)'>
<img id="selectimg" src="D:\D drive\d1x5u3.png" onclick='javascript:display(this)'>
<img id="selectimg" src="D:\D drive\ct0.jpg" onclick='javascript:display(this)'>
<img id="selectimg" src="D:\D drive\aftn.jpg" onclick='javascript:display(this)'>
</div>
</body>
and the output will be like this
This is just as simple as your requirement. but you need to do a lot more to design Image Gallery.
If you wanted to display the image when you place your mouse on the image, just replace onclick with onmouseover.