Edrol97
Bronze Coder
Hi all,
Wondering how to position the arrows of gallery in image below. I want them to be just over the vertical center of the image either side sort of hugging the focal point of the image. I also want the entire div to be centered. I attach both html and css code. CSS code is showing what I've tried that fails. Also an image of how it looks currently.
UPDATE: Solved centering of div with the following:
Help as always very much appreciated.
Thanks.
Eliot
Wondering how to position the arrows of gallery in image below. I want them to be just over the vertical center of the image either side sort of hugging the focal point of the image. I also want the entire div to be centered. I attach both html and css code. CSS code is showing what I've tried that fails. Also an image of how it looks currently.
UPDATE: Solved centering of div with the following:
CSS:
#imageslidercontainer {
position: relative;
top: 50%;
margin-left: 25%;
}
HTML:
<div id="imageslidercontainer">
<link rel="stylesheet" href="slider.css">
<div class="imageslider">
<div class="imageslider_images">
<img class="imgsli" src="img/MorningStarCover.png">
<img class="imgsli" src="img/MorningStarFullPage.png">
<img class="imgsli" src="img/MorningStarFnF.png">
</div>
<div class="imageslider_buttons">
<div class="slider_next_button" onclick="SliderNextImage()">
<img src="img/background/right-arrow.png" class="responsive"/>
</div>
<div class="slider_previous_button" onclick="SliderPreviousImage()">
<img src="img/background/left-arrow.png" draggable="false" class="responsive"/>
</div>
</div>
</div>
</div>
CSS:
#imageslidercontainer {
position: relative;
}
.slider_previous_button {
top: 50%;
left: 0px;
}
.slider_next_button {
top: 50%;
right: 0px;
}
.previous_button {
left: 300px;
}
.next_button {
right: 300px;
}
Help as always very much appreciated.
Thanks.
Eliot
Attachments
Last edited: