I've built this responsive site on WordPress and got a little curious as to how I can set the post thumbnails in percentages. Any help would be much appreciated.
Tell me more
×
WordPress Answers is a question and answer site for
WordPress developers and administrators. It's 100% free, no registration required.
|
This is not possible, images must have real absolute sizes :) A post thumbnail is essentially a different sized version of the image. While you can calculate how much for example 70% of 1024 is, and genereate a ~700px wide image, you cannot do this for each of your visitors. It would kill your host's CPU... The closest thing you can do is to browser-resize images to fit their container:
|
||||
|
|
Follow up to @OneTrickPony A: You could also use a background image, resize the container accordingly and then add |
|||
|