I got a slideshow, with a simple fade, and want to make it full size responsive.
I got the slideshow, the fullscreen settings and the responsive code all working, but the image is not centered all the way when resizing it. For the Slideshow I used a simple plugin which does the job very well.
I've tried dozens and dozens of codes and so on because I just don't want to use a pre-programmed slider.
So to conclude, my image needs to be centered to the window/ screen size always.
Code:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>xXxXx</title>
<script type="text/javascript" src="js/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="js/jquery.cycle2.min.js"></script>
<style type="text/css">
body {
font-family:sans-serfi;
}
.cycle-slideshow {
position: fixed;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
}
.cycle-slideshow img{
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
min-width: 50%;
min-height: 50%;
}
</style>
</head>
<body>
<div class="cycle-slideshow">
<img src="slider/1.jpg" alt="slider 1">
<img src="slider/2.jpg" alt="slider 2">
<img src="slider/3.jpg" alt="slider 3">
</div>
</body>
</html>