bellroy / lesswrong-migrated

Automatically exported from code.google.com/p/lesswrong
Other
0 stars 0 forks source link

Tweak post CSS to shrink images #363

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When adding an image link, the default is to transclude it at whatever raw size 
the image is. On posts, this can lead to an ugly underlap effect where a huge 
image scrolls off the screen and under the sidebars until the image is manually 
resized and uploaded. This apparently can be fixed by a standard CSS option to 
shrink images to fit the body of a post's width: 'fluid images'; see

http://unstoppablerobotninja.com/entry/fluid-images/
http://blog.kurtschindler.net/post/flexible-dynamically-resizing-images-with-css
http://stackoverflow.com/questions/787839/resize-image-proportionally-with-css

For example, on gwern.net I had the same problem and fixed it with:

img {
    max-width: 100%;
    height: auto;
    width: auto\9; /* ie8 */
}

Something like that might work for posts.

Original issue reported on code.google.com by gwe...@gmail.com on 18 Nov 2012 at 8:41

GoogleCodeExporter commented 9 years ago
Seems to be an issue for comments too: 
http://lesswrong.com/lw/fp5/2012_survey_results/7xhs (I manually shrank the 
images before uploading, but they're still not rendering cleanly.)

Original comment by gwe...@gmail.com on 29 Nov 2012 at 11:19