I recently added a jQuery slider only to notice that my links do not work anymore in my header. Can anybody help me find out why they will not work. All relevant code is below...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="Description" content="" />
<meta name="Keywords" content="" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="includes/global.css" type="text/css" />
<script type="text/javascript" src="includes/flowplayer_3.2.7/flowplayer-3.2.6.min.js"></script>
<script type="text/javascript" src="includes/jquery_1.6.1.js"></script>
<script type="text/javascript" src="includes/slideshow.js"></script>
<script type="text/javascript">
$(document).ready(function() {
slideShow();
});
</script>
<title></title>
</head>
<body>
<div id="wrap">
<div id="header">
<div id="header-links">
<p><a href="cart.php?action=none">My Cart</a></p>
</div>
</div>
<div id="header-photo">
<div id="gallery">
<a class="show"><img src="../images/header-photo.jpg" width="850" height="250" title="" alt="" rel="" style="border:0; padding:0;" /></a>
<a><img src="../images/header-photo-2.jpg" width="850" height="250" title="" alt="" rel="" style="border:0; padding:0;" /></a>
<a><img src="../images/header-photo-3.jpg" width="850" height="250" title="" alt="" rel="" style="border:0; padding:0;" /></a>
<a><img src="../images/header-photo-4.jpg" width="850" height="250" title="" alt="" rel="" style="border:0; padding:0;" /></a>
</div>
</div>
<div id="nav">
<ul>
<li><a href="/index.php">Home</a></li>
<li><a href="/my_videos.php">View My Videos</a></li>
<li><a href="/search.php">Search Videos</a></li>
<li><a href="/contact_us.php">Contact Us</a></li>
<li><a href="/links.php">Links</a></li>
</ul>
</div>
Here is my relevant CSS code:
/********************************************
LAYOUT
********************************************/
#wrap {
position: relative;
width: 910px;
margin: 0 auto;
text-align: left;
background: #000; /*#fff url(../images/content.jpg) repeat-y center top;*/
}
#content-wrap {
float: left;
width: 850px;
margin-left: 30px;
display: inline;
padding: 0;
border-top: 5px solid #000;
/*background: #fff url(../images/content-wrap.jpg) repeat-x;*/
/* IE10 */
background-image: -ms-radial-gradient(center, ellipse farthest-side, #FFFFFF -300%, #000000 100%);
/* Mozilla Firefox */
background-image: -moz-radial-gradient(center, ellipse farthest-side, #FFFFFF -300%, #000000 100%);
/* Opera */
background-image: -o-radial-gradient(center, ellipse farthest-side, #FFFFFF -300%, #000000 100%);
/* Webkit (Safari/Chrome 10) */
background-image: -webkit-gradient(radial, center center, 0, center center, 490, color-stop(-3, #FFFFFF), color-stop(1, #000000));
/* Webkit (Chrome 11+) */
background-image: -webkit-radial-gradient(center, ellipse farthest-side, #FFFFFF -300%, #000000 100%);
/* Proposed W3C Markup */
background-image: radial-gradient(center, ellipse farthest-side, #FFFFFF -300%, #000000 100%);
}
#header {
position: relative;
/*background: #fff url(../images/header-bg.jpg) repeat-y center top;*/
background-color:#000000;
height: 35px;
width:910px;
padding: 0;
color: #FFF;
}
/* Header Links */
#header #header-links {
position: absolute;
top: 8px;
right: 45px;
color: #FFF;
font-size: 14px;
font-weight: bold;
}
#header #header-links p {
padding: 0;
margin: 0;
}
#header #header-links a {
color: #FFF;
text-decoration: none;
}
#header #header-links a:hover {
color: #666;
}
/* Header Photo */
#header-photo {
position: relative;
clear: both;
margin: 5px auto;
height: 250px;
width: 850px;
/*background: #fff url(../images/header-photo.jpg) no-repeat center center;*/
background-color:#000;
}
#header-photo h1#logo-text a {
position: absolute;
margin: 0;
padding: 0;
font: bold 48px 'Trebuchet MS', Arial, Sans-serif;
letter-spacing: -1px;
color: #fff;
text-transform: none;
text-decoration: none;
border: none;
/* change the values of top and left to adjust the position of the logo*/
top: 22px;
left: 9px;
height: 48px;
}
#header-photo h2#slogan {
position: absolute;
margin: 0;
padding: 0;
font: bold 14px 'Trebuchet MS', Arial, Sans-serif;
text-transform: none;
color: #B6D1F8;
/* change the values of top and left to adjust the position of the slogan*/
top: 73px;
left: 33px;
}
/* Navigation */
#nav {
clear: both;
padding: 0;
}
#nav ul {
float: left;
list-style: none;
background: #E4E4E4 url(../images/nav.jpg) repeat-x;
width: 850px;
padding: 0; margin: 0 0 0 30px;
height: 45px;
display: inline;
text-transform: uppercase;
}
#nav ul li {
display: inline;
margin: 0; padding: 0;
}
#nav ul li a {
display: block;
float: left;
width: auto;
margin: 0;
padding: 0 15px;
border-right: 1px solid #dadada;
border-left: 1px solid #fafafa;
border-bottom: none;
color: #555;
font: bold 14px/45px "Century Gothic", "Trebuchet MS", Helvetica, Arial, Geneva, sans-serif;
text-transform: uppercase;
text-decoration: none;
letter-spacing: 1px;
}
#nav ul li a:hover,
#nav ul li a:active {
color: #326ea1;
}
#nav ul li#current a {
background: #DBDBDB url(../images/nav-current.jpg) repeat-x;
}
/* ========================================
Slideshow Header Styles
=========================================== */
.clear {
clear:both
}
#gallery {
position:relative;
height:360px
}
#gallery a {
float:left;
position:absolute;
}
#gallery a img {
border:none;
}
#gallery a.show {
z-index:500
}
#gallery .caption {
z-index:600;
background-color:#000;
color:#ffffff;
height:100px;
width:100%;
position:absolute;
bottom:0;
}
#gallery .caption .content {
margin:5px
}
#gallery .caption .content h3 {
margin:0;
padding:0;
color:#1DCCEF;
}
Here is the JS code for my slideshow:
function slideShow() {
//Set the opacity of all images to 0
$('#gallery a').css({opacity: 0.0});
//Get the first image and display it (set it to full opacity)
$('#gallery a:first').css({opacity: 1.0});
//Set the caption background to semi-transparent
$('#gallery .caption').css({opacity: 0.7});
//Resize the width of the caption according to the image width
$('#gallery .caption').css({width: $('#gallery a').find('img').css('width')});
//Get the caption of the first image from REL attribute and display it
$('#gallery .content').html($('#gallery a:first').find('img').attr('rel'))
.animate({opacity: 0.7}, 400);
//Call the gallery function to run the slideshow, 6000 = change to next image after 6 seconds
setInterval('gallery()',6000);
}
function gallery() {
//if no IMGs have the show class, grab the first image
var current = ($('#gallery a.show')? $('#gallery a.show') : $('#gallery a:first'));
//Get next image, if it reached the end of the slideshow, rotate it back to the first image
var next = ((current.next().length) ? ((current.next().hasClass('caption'))? $('#gallery a:first') :current.next()) : $('#gallery a:first'));
//Get next image caption
var caption = next.find('img').attr('rel');
//Set the fade in effect for the next image, show class has higher z-index
next.css({opacity: 0.0})
.addClass('show')
.animate({opacity: 1.0}, 1000);
//Hide the current image
current.animate({opacity: 0.0}, 1000)
.removeClass('show');
//Set the opacity to 0 and height to 1px
$('#gallery .caption').animate({opacity: 0.0}, { queue:false, duration:0 }).animate({height: '1px'}, { queue:true, duration:300 });
//Animate the caption, opacity to 0.7 and heigth to 100px, a slide up effect
$('#gallery .caption').animate({opacity: 0.7},100 ).animate({height: '100px'},500 );
//Display the content
$('#gallery .content').html(caption);
}