Forums

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

Home Forums CSS "height: auto" bug in Chrome

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #198991
    CeeDesign
    Participant

    I have a row of images (yes, of pigs), which works well in Firefox,
    but Chrome stretches the images vertically.
    I’m using PureCSS (purecss.io) for the grid.

    Check out the images:
    http://imgur.com/yUZUGrq
    http://imgur.com/YrzWicc

    And the live site:
    http://cdesign.fi/FoxCenter/yrityskeskus/kuvia/

    How do I make it work?

    #198994
    Jonathon Harrelson
    Participant

    You should use height:100%;, that will fix it and it will render properly across all browsers.

    #199053
    randomdude
    Participant

    Is something like

    img {
      object-position: center center;
      object-fit: cover;
    }
    

    What you want?

    #199055
    Jonathon Harrelson
    Participant

    They’re not background images, they’re embedded images, so

    img{
         height:100%;
    }
    

    should work

    #199057
    randomdude
    Participant

    @jharrelson Those properties are specifically for images, not background images.
    I’d need to see the code to know how to fix the problem, though. I’m just guessing right now.

    #251645
    leighm
    Participant

    @randomdude Thanks, this sorted a problem I was having with Chrome shrinking images.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘CSS’ is closed to new topics and replies.