Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

CSS gallery

Posted on 2014-12-29
4
Medium Priority
?
124 Views
Last Modified: 2014-12-31
Hi all,

Can somebody help me this one http://m5designstudio.com/2010/css/simple-css-gallery-image-text-rollover/.

I like a holder/default image instead of the white blank space, thumbnail pictures moved to the bottom with 14 spaces for images in two rows.

Same images can be used for all the spaces.

Thanks,

Ilyas
0
Comment
Question by:muvend
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 31

Accepted Solution

by:
Marco Gasi earned 2000 total points
ID: 40522050
Hi muvend.
Here the working code:
<!DOCTYPE HTML>
<html>
	<head>
		<title></title>
		<style type="text/css">
			/*<![CDATA[*/
			#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 span.first{ 
				visibility: visible; 
				position:absolute; 
				left: 30px; /*position where enlarged image is placed horizontally */
				top:120px; 
				z-index: 50; 
				color:#FFFFFF; 
			} 
			#simple_gallery a:link span.first {
				color:#FFFFFF; 
				text-decoration: none; 
				visibility:visible; 
			} 
			#simple_gallery a:visited span.first {
				text-decoration: none; 
				color:#FFFFFF; 
				visibility:visible;
			} 
			#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; 
			}
			/*]]>*/
		</style>
	</head>

	<body>
		<div id="simple_gallery"> 
			<a href="#"> 
				<img src="http://www.davidwightman.net/_images_landscape/Behemot/Behemot_detail_1.jpg" width="108" height="86" class="simple_thumbnails" />
				<span class="first"><img src="http://www.davidwightman.net/_images_landscape/Behemot/Behemot_detail_1.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="http://www.davidwightman.net/_images_landscape/Behemot/Behemot_detail_2.jpg" width="108" height="86" class="simple_thumbnails" />
				<span>
					<img src="http://www.davidwightman.net/_images_landscape/Behemot/Behemot_detail_2.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="http://www.davidwightman.net/_images_landscape/Behemot/Behemot_detail_3.jpg" width="108" height="86" class="simple_thumbnails" />
				<span>
					<img src="http://www.davidwightman.net/_images_landscape/Behemot/Behemot_detail_3.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>
	</body>
</html>

Open in new window

The trick is to create a class called .first and give it to the first span: the only difference with the span rules is the visibility and the left properties.

I didn't adjut the container width to the image linked, but I'm sure you don't need help for this :-)

Cheers
0
 

Author Closing Comment

by:muvend
ID: 40525363
Thank you very much Marco.
0
 
LVL 31

Expert Comment

by:Marco Gasi
ID: 40525384
Glad to help you muvend. Happy New Year and thanks for points!
0
 

Author Comment

by:muvend
ID: 40525462
Thanks for your help. I wish you a happy 2015 Marco.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question