I'm just a complete beginner so most of what I have are combinations from tutorial sites but I'm really stuck on this that it keeps jumping to the top of the page when I try to cycle through next image etc. Being a totally newby any detailed help is really appreciated? I don't know where I'm going wrong and have no clue where to even start to fix it?
#gallerywrapper {
width:640px;
height:450px;
margin:0 auto;
position:relative;
font-family:verdana, arial, sans-serif;
}
#gallerywrapper #gallery {
position:absolute;
left:0;
top:0;
height:450px;
width:640px;
overflow:hidden;
text-align:center;
}
#gallerywrapper #gallery div {
width:640px; height:900px;
padding-top:10px;
position:relative;
}
#gallerywrapper #gallery div img {
clear:both;
display:block;
margin:0 auto;
border:0;
}
#gallerywrapper #gallery div h3 {
padding:10px 0 0 0;
margin:0;
font-size:18px;
}
#gallerywrapper #gallery div p {
padding:5px 0;
margin:0;
font-size:12px;
line-height:18px;
}
#gallery .previous{
display:inline;
float:left;
margin-left:80px;
text-decoration:none;
background-color: #ddd;
color: black;
border-radius: 50%;
padding: 8px 16px;
}
#gallery .next{
display:inline;
float:right;
margin-right:80px;
text-decoration:none;
background-color: #FA4B2A;
color: white;
border-radius: 50%;
padding: 8px 16px;
}
<div id="gallerywrapper">
<div id="gallery">
<div id="pic1">
<img src="images/b1.jpg" height="350" width="500" alt="Image 1">
<a class="previous round" href="#pic5" >‹</a>
<a class="next round" href="#pic2" >›</a>
<h3>Botanical Gardens</h3>
</div>
<div id="pic2">
<img src="images/b2.jpg" height="350" width="500" alt="Image 2">
<a class="previous round" href="#pic1">‹</a>
<a class="next round" href="#pic3">›</a>
<h3>Botanical Gardens</h3>
</div>
<div id="pic3">
<img src="images/b3.jpg" height="350" width="500" alt="Image 3">
<a class="previous round" href="#pic2">‹</a>
<a class="next round" href="#pic4">›</a>
<h3>Botanical Gardens</h3>
</div>
<div id="pic4">
<img src="images/b4.jpg" height="350" width="500" alt="Image 4">
<a class="previous round" href="#pic3">‹</a>
<a class="next round" href="#pic5">›</a>
<h3>Botanical Gardens</h3>
</div>
<div id="pic5">
<img src="images/b5.jpg" height="350" width="500" alt="Image 5">
<a class="previous round" href="#pic4">‹</a>
<a class="next round" href="#pic1">›</a>
<h3>Botanical Gardens</h3>
</div>
</div>
</div>