JSFiddle - React, Tailwind, and code Playground
HTML
<body>
<!-- Begin Content and Slideshow HTML -->
<div id="top">
<div id="header">
<a href=""><img src="../images/logo.png"></a>
</div>
</div>
<div id="container">
<div id="content">
<h1>Slideshow name</h1>
<p>Slideshow description.</p>
</div>
<div id="slideshow">
<div id="controls">
<center>
<table>
<tr>
<td align="left"><a href="javascript:change_image(-1)"> < </a></td>
<td align="right"><a href="javascript:auto()">     Auto     </a></td>
<td align="right"><a href="javascript:change_image(1)"> > </a></td>
</tr>
</table>
</center>
</div>
<div id="images">
<img src="http://a121.g.akamai.net/7/121/21164/20120111163621/content.fromyouflowers.com/images/products/large/BF89-11K.jpg" name="slideshow" />
</div>
</div>
<!--
<div id="thumbnails">
<img width="75px" height="125px" src="images/conifer01.jpg" name="slideshow" />
</div>
-->
<div id="description">
First description here
</div>
<br />
</div>
<div id="bottom">
<div id="footer">
Copyright ©Company
<br />
Address
<br />
Phone
</div>
</div>
</body>
CSS
html {
font-family: Georgia, Arial, Helmet, Freesans, sans-serif;
}
body {
margin:0px;
}
a:link {
color: #FFFFFF;
text-decoration: none;
}
/* visited link */
a:visited {
color: #FFFFFF;
text-decoration: none;
}
/* mouse over link */
a:hover {
color: #FFFFFF;
text-decoration: none;
}
/* selected link */
a:active {
color: #FFFFFF;
text-decoration: none;
}
#top {
width:100%;
height:100px;
background-color: #103F1C;
padding: 0;
margin: 0;
}
#header {
margin: 0 auto;
padding: 0;
width: 1000px;
height:100px;
color: #FFFFFF;
}
#content{
padding-left: 25px;
padding-right: 25px;
}
#container {
width: 948px;
border-left: 1px solid #000000;
border-right: 1px solid #000000;
margin: 0 auto;
padding: 0;
padding-left: 25px;
padding-right: 25px;
position: relative;
background-color: #F5F5DC;
overflow: hidden;
}
#slideshow {
width: 900px;
height: 600px;
margin: 0 auto;
background-color: #000000;
opacity: .9;
position: relative;
}
#images {
height: 548px;
width: 898px;
border: 1px solid #000000;
}
#images img {
display: block;
margin-left: auto;
margin-right: auto;
opacity: 1;
vertical-align: middle;
position: relative;
top: 50%;
transform: translateY(-50%);
}
#controls{
width: 900px;
height: 45px;
margin: 0 auto;
background-color: #00502F;
color: #FFFFFF;
}
#controls td {
font-size: 30px;
}
#description {
width: 848px;
height:53px;
padding: 0;
padding-left: 25px;
padding-right: 25px;
background-color: #00502F;
margin-left: auto;
margin-right: auto;
color: #FFFFFF;
border: 1px solid #103F1C;
}
#bottom {
width:100%;
height:60px;
background-color: #103F1C;
z-index: 0;
margin: 0;
padding: 0;
}
#footer {
width: 1000px;
height: 60px;
text-align: center;
color: #FFFFFF;
margin: 0 auto;
}
JavaScript
var Image = new Array(
"images/conifer01.jpg", // First image must also be referenced in div "images"
"images/conifer02.jpg",
"images/conifer03.jpg",
"images/conifer04.jpg"
// Last array item cannot have a comma or script breaks
);
/* End Image References*/
/* Begin Image Descriptions */
var Description = new Array(
"First description here", // First description must also be writting in div "description"
"Second description here",
"Third description here",
"Fourth description here"
// Last array item cannot have a comma or script breaks
);
/* End Image Descriptions */
var Image_Number = 0;
var Image_Length = Image.length - 1;
function change_image(num){
Image_Number = Image_Number + num;
if (Image_Number > Image_Length){
Image_Number = 0;
}
if (Image_Number < 0){
Image_Number = Image_Length;
}
document.slideshow.src = Image[Image_Number];
document.getElementById("description").innerHTML = Description[Image_Number];
// return false;
}
function auto() {
setInterval("change_image(1)", 3500);
}