Simple CSS Gallery: Image & Text Rollover

m5 design studio logo

Create a simple CSS gallery with thumbnails, large images and text.

Demo

HTML CODE

<div id="simple_gallery">
<a  href="#">  <img src="images/one_s.jpg" width="108" height="86" class="simple_thumbnails" /><span><img src="images/one.jpg" /><br />
IMAGE ONE: Lorem ipsum dolor sit amet, consectetur adiscing elit. In ut ligula. Fusce risus diam, dapibus eget, ullamcorper eu. </span></a> <a href="#"> <img src="images/two_s.jpg" width="108" height="86" class="simple_thumbnails" /><span><img src="images/two.jpg" /><br /> IMAGE TWO:Lorem ipsum dolor sit amet, consectetur adiscing elit. In ut ligula. Fusce risus diam, dapibus eget, ullamcorper eu.</span></a> <a href="#"> <img src="images/three_s.jpg" width="108" height="86" class="simple_thumbnails" /><span><img src="images/three.jpg" /><br /> IMAGE THREE:Lorem ipsum dolor sit amet, consectetur adiscing elit. In ut ligula. Fusce risus diam, dapibus eget, ullamcorper eu.</span></a> <a href="#"> <img src="images/four_s.jpg" width="108" height="86" class="simple_thumbnails" /><span><img src="images/four.jpg" /><br /> IMAGE FOUR:Lorem ipsum dolor sit amet, consectetur adiscing elit. In ut ligula. Fusce risus diam, dapibus eget, ullamcorper eu.</span></a> </div>

CSS CODE

 
/*  Simple Css Gallery */

#gallery_container {
	background-color: #99CC99;
	height: 650px;
	width: 800px;
	padding:10px;
  	margin: auto;
	position: relative;
}

/* Drak Grey container that holds gallery */

#simple_gallery {
	background-color: #333333;
	height: 530px;
	width: 515px;
	position:relative;
	margin: auto;
}


#simple_gallery img {border: 5px solid #FFFFFF;}

/* Thumbnails styles */
.simple_thumbnails {
margin:5px;
float:left;	
}



/* Large rollover image styles */
#simple_gallery span img {
margin-bottom: 10px
}



#simple_gallery span{
visibility:hidden;
position:absolute;
top:120px;
color:#FFFFFF;
font-size:12px;
width:435px;
left:-1000px; /* prevents the browser to show scroll bar at bottom*/
	}

#simple_gallery a:link span {
color:#FFFFFF;
text-decoration: none;
visibility:hidden;
}

#simple_gallery a:visited span {
text-decoration: none;
color:#FFFFFF;
visibility:hidden;
}

#simple_gallery a:hover span{ /*CSS for enlarged image*/
visibility: visible;
position:absolute;
left: 30px; /*position where enlarged image is placed horizontally */
top:120px;
z-index: 50;
color:#FFFFFF;
}

#simple_gallery a:active span {
text-decoration: none;
color:#FFFFFF;
visibility:hidden;
}

Category: CSS Tags: , 7 Comments

Author

M5 Design Studio

We are a small, but creative and passionate team of designers and developers specializing in web design, graphic design, branding & digital marketing.


orlando web design company

How to add animation to a website

Orlando Web Design Company Small, simple animations are fun and interesting! They can keep your users engaged and spice
orlando web deisgn bootstrap

Customizing Bootstrap

Orlando Web Design & Development Twitter's Bootsrap is a powerful front-end framework for faster and easier web dev
web design orlando lesson 6

Orlando Web Design: CSS Page Layout – Understanding CSS Positioning

Orlando Web Design & Development CSS Page Layout: Understanding CSS Positioning There are 3 ways of creating CSS l

Comments:





  1. Pingback: Wordpress - Salon Geek