Problems centering slideshow

Asked

Viewed 177 times

0

I want to center my slideshow, only when I put the style margin: 0 auto does not centralize and this happens:

inserir a descrição da imagem aqui

CSS code:

.slideshow {
    width:100%;
    max-width:980px;
    height:auto;
    margin:0 auto;
}

.slide {
    width:100%;
    height:auto;
    display:block;
}

.slide-1 {
    width:75%;
    height:505px;
    float:left;
}

.slide-2 {
    width:25%;
    height:250px;
    float:left;
}

.slide-3 {
    width:25%;
    height:250px;
    float:left;
}

.slide-1 img {
    width:700px;
    height:500px;
}

.slide-2 img {
    width:400px;
    height:250px;
    margin-left:-35px;
}

.slide-3 img {
    width:400px;
    height:250px;
    margin-left:-35px;
}

1 answer

0

Try to put this:

.slideshow {
    position:relative;
    width:100%;
    max-width:980px;
    height:auto;
    margin:0 auto;
}
  • didn’t work !

  • well, my code of . container is this: {max-width: 960px; width: 100%; height: auto; position: relative; margin: 0 auto; z-index: 10} your is equal... put your html ai structure

  • <div class="slideshow"> <div class="slide"> <div class="slide-1"> <img src="img/01.jpg"> </div> <div class="slide-2">#Xa; <img src="img/img02.jpg"> </div> <div class="slide-3" <img src=="img"img/img02.jpg"> </div> </div> </div>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.