473,624 Members | 2,117 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Links not working in slideshow

KeredDrahcir
426 Contributor
I needed a slide show that showed an image wider than my browser window so that at higher resolutions to image would still fill the screen.

To prevent getting scroll bars on a lower resolutions screen, I decided to do it as a background image and since I had five images that I wanted to show in a slideshow I found a background image slide show.

The problem I've got is a need to make the image link to something and putting an anchor on the image was the best options. I tried it with text first and although it shows the text underlined as a link, I can't click it and the pointer doesn't change.

Could anybody have a look at the code please and either let me know how I can make the link work or even better where I can find a more user friendly, background image slideshow that can have a fading transition and a custom speed?

HTML
Expand|Select|Wrap|Line Numbers
  1. <div style="height: 388px; width: 100%;">
  2.     <ul class="cb-slideshow">
  3.         <li>
  4.             <span>Image 01</span>
  5.             <div>
  6.                 <h3>
  7.                     &nbsp;</h3>
  8.             </div>
  9.         </li>
  10.         <li>
  11.             <span>Image 02</span>
  12.             <div>
  13.                 <h3>
  14.                     &nbsp;</h3>
  15.             </div>
  16.         </li>
  17.         <li>
  18.             <span>Image 03</span>
  19.             <div>
  20.                 <h3 style="cursor:pointer !important;">
  21.                     <a href="link">Dogs were invented before the wheel</a></h3>
  22.             </div>
  23.         </li>
  24.         <li>
  25.             <span>Image 04</span>
  26.             <div>
  27.                 <h3>
  28.                     &nbsp;</h3>
  29.             </div>
  30.         </li>
  31.         <li>
  32.             <span>Image 05</span>
  33.             <div>
  34.                 <h3>
  35.                     &nbsp;</h3>
  36.             </div>
  37.         </li>
  38.         <!--
  39.         <li>
  40.             <span>Image 06</span>
  41.             <div>
  42.                 <h3>
  43.                     &nbsp;</h3>
  44.             </div>
  45.         </li>-->
  46.     </ul>
  47. </div>
  48.  
CSS
Expand|Select|Wrap|Line Numbers
  1. .cb-slideshow,
  2. .cb-slideshow:after { 
  3.     margin-bottom: 0 !important;
  4. }
  5. .cb-slideshow:after { 
  6.     content: '';
  7. }
  8. .cb-slideshow li span { 
  9.     width: 100%;
  10.     height: 395px;
  11.     position: absolute;
  12.     top: 135px;
  13.     left: 0px;
  14.     color: transparent;
  15.     background-size: cover;
  16.     background-position: 50% 50%;
  17.     background-repeat: no-repeat;
  18.     opacity: 0;
  19.     z-index: 0;
  20.     -webkit-backface-visibility: hidden;
  21.     -webkit-animation: imageAnimation 30s linear infinite 0s;
  22.     -moz-animation: imageAnimation 30s linear infinite 0s;
  23.     -o-animation: imageAnimation 30s linear infinite 0s;
  24.     -ms-animation: imageAnimation 30s linear infinite 0s;
  25.     animation: imageAnimation 30s linear infinite 0s; 
  26. }
  27. .cb-slideshow li div { 
  28.     z-index: 1000;
  29.     position: absolute;
  30.     bottom: 30px;
  31.     left: 0px;
  32.     width: 100%;
  33.     text-align: center;
  34.     opacity: 0;
  35.     color: #fff;
  36.     -webkit-animation: titleAnimation 30s linear infinite 0s;
  37.     -moz-animation: titleAnimation 30s linear infinite 0s;
  38.     -o-animation: titleAnimation 30s linear infinite 0s;
  39.     -ms-animation: titleAnimation 30s linear infinite 0s;
  40.     animation: titleAnimation 30s linear infinite 0s; 
  41. }
  42. .cb-slideshow li div h3 { 
  43.     font-family: 'BebasNeueRegular', 'Arial Narrow', Arial, sans-serif;
  44.     font-size: 240px;
  45.     padding: 0;
  46.     line-height: 200px; 
  47.     display: block;
  48.     z-index: 9000000;
  49. }
  50. .cb-slideshow li:nth-child(1) span { 
  51.     background-image: url(image1);
  52. }
  53. .cb-slideshow li:nth-child(2) span { 
  54.     background-image: url(image2);
  55.     -webkit-animation-delay: 6s;
  56.     -moz-animation-delay: 6s;
  57.     -o-animation-delay: 6s;
  58.     -ms-animation-delay: 6s;
  59.     animation-delay: 6s; 
  60. }
  61. .cb-slideshow li:nth-child(3) span { 
  62.     background-image: url(image3);
  63.     -webkit-animation-delay: 12s;
  64.     -moz-animation-delay: 12s;
  65.     -o-animation-delay: 12s;
  66.     -ms-animation-delay: 12s;
  67.     animation-delay: 12s; 
  68. }
  69. .cb-slideshow li:nth-child(4) span { 
  70.     background-image: url(image4);
  71.     -webkit-animation-delay: 18s;
  72.     -moz-animation-delay: 18s;
  73.     -o-animation-delay: 18s;
  74.     -ms-animation-delay: 18s;
  75.     animation-delay: 18s; 
  76. }
  77. .cb-slideshow li:nth-child(5) span { 
  78.     background-image: url(image5);
  79.     -webkit-animation-delay: 24s;
  80.     -moz-animation-delay: 24s;
  81.     -o-animation-delay: 24s;
  82.     -ms-animation-delay: 24s;
  83.     animation-delay: 24s; 
  84. }
  85. .cb-slideshow li:nth-child(6) span { 
  86.     background-image: url(image to come);
  87.     -webkit-animation-delay: 30s;
  88.     -moz-animation-delay: 30s;
  89.     -o-animation-delay: 30s;
  90.     -ms-animation-delay: 30s;
  91.     animation-delay: 30s; 
  92. }
  93. .cb-slideshow li:nth-child(2) div { 
  94.     -webkit-animation-delay: 6s;
  95.     -moz-animation-delay: 6s;
  96.     -o-animation-delay: 6s;
  97.     -ms-animation-delay: 6s;
  98.     animation-delay: 6s; 
  99. }
  100. .cb-slideshow li:nth-child(3) div { 
  101.     -webkit-animation-delay: 12s;
  102.     -moz-animation-delay: 12s;
  103.     -o-animation-delay: 12s;
  104.     -ms-animation-delay: 12s;
  105.     animation-delay: 12s; 
  106. }
  107. .cb-slideshow li:nth-child(4) div { 
  108.     -webkit-animation-delay: 18s;
  109.     -moz-animation-delay: 18s;
  110.     -o-animation-delay: 18s;
  111.     -ms-animation-delay: 18s;
  112.     animation-delay: 18s; 
  113. }
  114. .cb-slideshow li:nth-child(5) div { 
  115.     -webkit-animation-delay: 24s;
  116.     -moz-animation-delay: 24s;
  117.     -o-animation-delay: 24s;
  118.     -ms-animation-delay: 24s;
  119.     animation-delay: 24s; 
  120. }
  121. .cb-slideshow li:nth-child(6) div { 
  122.     -webkit-animation-delay: 30s;
  123.     -moz-animation-delay: 30s;
  124.     -o-animation-delay: 30s;
  125.     -ms-animation-delay: 30s;
  126.     animation-delay: 30s; 
  127. }
  128. /* Animation for the slideshow images */
  129. @-webkit-keyframes imageAnimation { 
  130.     0% { opacity: 0;
  131.     -webkit-animation-timing-function: ease-in; }
  132.     8% { opacity: 1;
  133.          -webkit-animation-timing-function: ease-out; }
  134.     17% { opacity: 1 }
  135.     25% { opacity: 0 }
  136.     100% { opacity: 0 }
  137. }
  138. @-moz-keyframes imageAnimation { 
  139.     0% { opacity: 0;
  140.     -moz-animation-timing-function: ease-in; }
  141.     8% { opacity: 1;
  142.          -moz-animation-timing-function: ease-out; }
  143.     17% { opacity: 1 }
  144.     25% { opacity: 0 }
  145.     100% { opacity: 0 }
  146. }
  147. @-o-keyframes imageAnimation { 
  148.     0% { opacity: 0;
  149.     -o-animation-timing-function: ease-in; }
  150.     8% { opacity: 1;
  151.          -o-animation-timing-function: ease-out; }
  152.     17% { opacity: 1 }
  153.     25% { opacity: 0 }
  154.     100% { opacity: 0 }
  155. }
  156. @-ms-keyframes imageAnimation { 
  157.     0% { opacity: 0;
  158.     -ms-animation-timing-function: ease-in; }
  159.     8% { opacity: 1;
  160.          -ms-animation-timing-function: ease-out; }
  161.     17% { opacity: 1 }
  162.     25% { opacity: 0 }
  163.     100% { opacity: 0 }
  164. }
  165. @keyframes imageAnimation { 
  166.     0% { opacity: 0;
  167.     animation-timing-function: ease-in; }
  168.     8% { opacity: 1;
  169.          animation-timing-function: ease-out; }
  170.     17% { opacity: 1 }
  171.     25% { opacity: 0 }
  172.     100% { opacity: 0 }
  173. }
  174. /* Animation for the title */
  175. @-webkit-keyframes titleAnimation { 
  176.     0% { opacity: 0 }
  177.     8% { opacity: 1 }
  178.     17% { opacity: 1 }
  179.     19% { opacity: 0 }
  180.     100% { opacity: 0 }
  181. }
  182. @-moz-keyframes titleAnimation { 
  183.     0% { opacity: 0 }
  184.     8% { opacity: 1 }
  185.     17% { opacity: 1 }
  186.     19% { opacity: 0 }
  187.     100% { opacity: 0 }
  188. }
  189. @-o-keyframes titleAnimation { 
  190.     0% { opacity: 0 }
  191.     8% { opacity: 1 }
  192.     17% { opacity: 1 }
  193.     19% { opacity: 0 }
  194.     100% { opacity: 0 }
  195. }
  196. @-ms-keyframes titleAnimation { 
  197.     0% { opacity: 0 }
  198.     8% { opacity: 1 }
  199.     17% { opacity: 1 }
  200.     19% { opacity: 0 }
  201.     100% { opacity: 0 }
  202. }
  203. @keyframes titleAnimation { 
  204.     0% { opacity: 0 }
  205.     8% { opacity: 1 }
  206.     17% { opacity: 1 }
  207.     19% { opacity: 0 }
  208.     100% { opacity: 0 }
  209. }
  210. /* Show at least something when animations not supported */
  211. .no-cssanimations .cb-slideshow li span{
  212.     opacity: 1;
  213. }
  214.  
  215. @media screen and (max-width: 1140px) { 
  216.     .cb-slideshow li div h3 { font-size: 140px }
  217. }
  218. @media screen and (max-width: 600px) { 
  219.     .cb-slideshow li div h3 { font-size: 80px }
  220. }
Can anyone help please?
May 31 '13 #1
0 1309

Sign in to post your reply or Sign up for a free account.

Similar topics

2
3951
by: Ginchy | last post by:
I have uploaded a small 3 page web using MS Publisher 2003 and after uploading I switched on url masking to cloak the url. I am certain that it worked fine. I simply changed the colour scheme in Publisher and reuploaded the page. The links no longer work? When I switch off url masking it works as it should?
8
2028
by: drillbit_99 | last post by:
I have an HTML page of thumbnail images. Each image can begin a slideshow of the images on the page by clicking on the image. This opens another HTML page that begins the slideshow using large images of the thumbnails. When the slideshow begins it always starts with the first image. I would like to pass the name of the thumbnail to the slideshow HTML page and begin the slideshow with the same image the user clicks on. Is this asking...
0
1119
by: TurboT | last post by:
We had a an intermittent problem with the aspnet links on our external website. It seemed to be related to the following, but I was wondering if there is some timeout, or caching parameter which could cause these symptoms. Let me explain: 1. For a short time our DNS was unavailable to the external webserver and some links on the external site where not working.. .dependant on the html code. Once fixed all other aspects of the website...
22
5114
by: bevoldjling | last post by:
Hi ! I need some help in putting together a website for our family gathering. Although I'm still pretty "green", I don't think what I need requires terribly advanced skills ...except for one area that has me right baffled. I want to put up a photo album slideshow but I want to stay away from Flash & Javascript. It just seems that anytime I use them, somebody
3
3122
by: eligius | last post by:
Found this neat slideshow javascript with linked images. Is it at all possible to change the properties (height, with, etc.) of the opened window of every individual link? <script language="JavaScript1.1"> <!-- /* JavaScript Image slideshow: By JavaScript Kit (www.javascriptkit.com) Over 200+ free JavaScript here! */
8
1518
by: GabrielESandoval | last post by:
i currently use the code below to create a slideshow of images. i edited it so that its not as long. i currently have over 20 images i want to change it so that the images dont appear in the same order each time. what would i have to change to make the cycle random??? thanks in advance for the help. gabriel -- heres the code --
1
1156
by: Bssp | last post by:
Hello all, I have the following script added to a webpage im working on and i cannot get the graphics to display. Could someone tell me whats wrong please. The idea is that each time the page loads the 9 graphics appear in a different position in the 3 by 3 grid chosen randomly. At the moment only the filename appears. <script type="text/javascript"> var slideshow = new Array () slideshow = "new1.jpg" slideshow = "new2.jpg"
3
1568
by: Gaby Sandoval | last post by:
I have a very simple javascript slideshow. It is extremely basic (see small sample below): <script language="JavaScript1.1"> <!-- //specify interval between slide (in mili seconds) var slidespeed=100
1
2693
by: Gaby Sandoval | last post by:
i currently use a SQL statement on my website to display a group of images (more specifically their location on the server) and links from the access database. only images that meet certain criteria are displayed in a table with the logo in one column and corresponding text link in the other column. the goal i have is to do away with this and instead of a very large, to make an image slideshow that scrolls through all the logos. i know...
0
8680
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8624
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8478
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7164
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6111
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5565
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4082
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
1786
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1485
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.