Image Slider with Text in Squarespace 7.1
Slide 1
Ullamco esse in ipsum Lorem qui nisi quis cillum ut est. Eu consequat aute laboris ut sint et aute incididunt consectetur voluptate nulla anim irure eiusmod.
Learn more
Slide 2
Ullamco esse in ipsum Lorem qui nisi quis cillum ut est. Eu consequat aute laboris ut sint et aute incididunt consectetur voluptate nulla anim irure eiusmod.
Learn more
Slide 3
Ullamco esse in ipsum Lorem qui nisi quis cillum ut est. Eu consequat aute laboris ut sint et aute incididunt consectetur voluptate nulla anim irure eiusmod.
Learn more
❮
❯
CSS
//Step 1 - Removing padding around the content in the section
[data-section-id="SECTION ID HERE"]{
padding-top:0px !important;
box-sizing:border-box !important;
.content-wrapper{
padding:0px !important;
min-height:100vh !important;
max-width:none !important;
margin:auto !important;
}
//SS7.1 adds some weird reverse margin thing, so we adjust that
.sqs-layout > .sqs-row{
margin-right:0px;
margin-left:0px;
}
//remove the padding around the code block that the HTML is in
#block-yui_id{
padding:0px !important;
}
//Creating the slideshow container
.slideshow-container{
max-width: 100%;
position: relative;
display:block;
margin: auto;
height:100vh !important;
}
//Hiding Each Slide by default
.mySlides{
display: none;
//Making the images be full-width and height
img{
width:100% !important;
height:100vh !important;
object-fit: cover !important;
}
a{
margin:17px;
}
}
//creating the left and right arrow buttons
.prev, .next{
cursor: pointer;
position: absolute;
top: 50%;
width: auto;
margin-top: -22px;
padding: 16px;
color: white;
font-weight: bold;
font-size: 18px;
transition: 0.6s ease;
border-radius: 0 3px 3px 0;
user-select: none;
}
// Positioning the next and previous arrow buttons
.next{
right: 0px;
border-radius: 3px 0 0 3px;
}
.prev{
left: 0px;
border-radius: 0px 3px 3px 0px;
}
//adding hover effets
.prev:hover, .next:hover {
background-color: rgba(0,0,0,0.8);
}
//Creating the Content box that text and buttons go in
.text-containter {
background-color:hsla(0,0,0,.65);
padding:1rem;
box-sizing:border-box;
color: #f2f2f2;
position: absolute;
width: 80%;
text-align: center;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
//Creating the box that the dots at the bottom go in
.dots-containter{
position: absolute;
display:inline-block;
bottom:15px;
left:0;
right:0;
margin-left:auto !important;
margin-right:auto !important;
}
//Creating the dot at the bottom
.dot {
z-index:99 !important;
cursor: pointer;
height: 15px;
width: 15px;
margin: 0 2px;
background-color: #bbb;
border-radius: 50%;
display: inline-block;
transition: background-color 0.6s ease;
}
//Creating an active class that will be added to the active slide's dot using js
.active, .dot:hover {
background-color: #717171;
}
// Creating the Fade Animation between slides
.fade {
-webkit-animation-name: fade;
-webkit-animation-duration: 1.5s;
animation-name: fade;
animation-duration: 1.5s;
}
@-webkit-keyframes fade {
from {opacity: .4}
to {opacity: 1}
}
@keyframes fade {
from {opacity: .4}
to {opacity: 1}
}
}