Image inside a div

0

I'm doing a small web page but I have some problems with the styles. My problem is this:

I have a slider like this

Now, using the class img-resposive of bootstrap, the images adapt to their containers. However, I need that, in col-md-4 , which in turn contains 3 article with one image each, the image overflows the article but does not invade the others.

That is, the image would be the yellow box, and

  • The image overflows from the div

  • Focus vertically

  • What has overflowed up and down is hidden so that other articles are not invaded.

  • asked by Missael Armenta 22.02.2018 в 19:03
    source

    2 answers

    0

    You need to apply CSS classes with some parameters to the image container. I give you some tips: with width and height (teninedo display:block ) you get to fill the entire container of the image. On the other hand, if you want the image to be 1: 1 and be hidden, the container must have a property in CSS that is overflow:hidden .

    To see if with something of that you can do something;)

    I'm glad I helped. Have a good day!

        
    answered by 23.02.2018 в 06:46
    0

    You could try combinations of the properties overflow-x (to handle the horizontal overflow), and overflow-y (to handle the vertical overflow). As you do not provide additional code or more information about what you want to achieve, it's a bit difficult.

    You leave a jsFiddle for you to see the properties overflow-x and%% overflow-y action.

    I hope I help you.

        
    answered by 23.02.2018 в 07:19