Forums

Give help. Get help.

  • # November 4, 2017 at 12:34 am

    i will paste now the css code here : .gallery {
    margin-left:101px;
    width: 640px;
    padding: 5px;
    float:left;
    box-shadow: 0 1px 2px rgba(0,0,0,.3);
    }

    .gallery > div {
    position: relative;
    float: left;
    padding: 5px;
    }

    .gallery > div > img {

    width: 200px;
    transition: .1s transform;
    transform: translateZ(0); /* hack */
    }

    .gallery > div:hover {
    z-index: 1;
    }

    .gallery > div:hover > img {
    transform: scale(1.7,1.7);
    transition: .3s transform;
    }

    .cf:before, .cf:after {
    display: table;
    content: “”;
    line-height: 0;
    }

    .cf:after {
    clear: both;
    }

    i want to ask why my gallery have only 3 collums and i cant add more , when i add photo they are added only under last one . Sorry for bad english , thanks :)

    # November 4, 2017 at 2:03 am

    The width of the gallery container is 640px

    The width of the images inside it are 200px

    200 into 640 goes 3 times.

    (NOTE: There is additional padding to account for too which can also affect the box model if it hasn’t been absorbed by box-sizing: border-box;. That may or may not be in effect in some form of global/local reset elsewhere in your CSS.)

    # November 4, 2017 at 2:25 am

    Sorry but i dont understand you , what exactly i should do if you can post code :/ sorry for this

    # November 4, 2017 at 2:30 am

    Hmmm, it’s simple mathematics…

    Well, you could start by increasing the width of the gallery container (640px) to allow 4 images to sit along the same row. I don’t need to post code for you – you just need to edit what’s there.

    # November 4, 2017 at 6:31 am

    sorry , now i understand it , just i am new :)

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

icon-anchoricon-closeicon-emailicon-linkicon-logo-staricon-menuicon-nav-guideicon-searchicon-staricon-tag