Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Images overflowing a flexbox?

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #271583
    RomanP
    Participant

    I’ve searched 30 minutes for a solution and I cannot crack this simple problem.

    I have a fixed-width flexbox, and I need (n) images to fit proportionally inside one row. No matter what I try the images overflow. Is this possible with flexbox?

    https://codepen.io/romanp/pen/ZoZZQP

    #272338
    Dagny
    Participant

    The images have different sizes. If you want them the same size you gotta crop them if you want to retain the aspect ration. If not, you have to set their width & height:

    img{
        width: 190px;
        height: 100px;
    }
    
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.