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

Home Forums CSS How did Chris make the images scale in posts?

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #35443

    Hi –

    I was just wondering, when you resize the browser while looking at a post, if the post has any images those images resize also and stay in the correct size, even though when you look at the image it has been given a specific width and height? Does Chris use JavaScript to do this somehow?

    I know you could just make the image size 100% and have no height but it’s for a client whos going to be using wordpress which auto adds width and height (like chris’s images) and i can’t really ask them to change the code.

    Any solutions?

    Thanks :)


    Chris Coyier

    img { max-width: 100%; height: auto !important; }


    is it possible to do this with a div?

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