meicdon13: (Default)
[personal profile] meicdon13 posting in [community profile] style_system
Is it possible to set a maximum image width for your layout in your CSS? Sometimes some of my DW friends post huge images that take forever to load.

Thanks in advance for any help!

Date: 2011-11-02 05:55 am (UTC)
musyc: A kitten sitting on an open book (Books: Kitten)
From: [personal profile] musyc
I use this:

.entry-content img { max-width: 500px; }

Change to whatever number works best for you.

Date: 2011-11-02 11:53 pm (UTC)
matgb: Artwork of 19th century upper class anarchist, text: MatGB (Default)
From: [personal profile] matgb
I use

.entry-content img { max-width: 99%; }

for mine, then it scales to whatever monitor size I'm on nicely and can't overflow. Rather nifty little trick.

Just checked, I'm not using .entry-content, I'm using .contents, but don't think it should make any difference.

Date: 2011-11-02 06:32 am (UTC)
foxfirefey: A wee rat holds a paw to its mouth. Oh, the shock! (myword)
From: [personal profile] foxfirefey
Hrm, if they're taking forever to load, them chances are the images is big in SIZE, not just dimension, and it'll take forever to load no matter what you do with CSS--although [personal profile] musyc's suggestion will definitely keep the width down!

Date: 2011-11-02 11:45 am (UTC)
From: [personal profile] lilmoka
*butts in*

Your icon is the most adorable thing ever!

Date: 2011-11-02 05:16 pm (UTC)
musyc: Silver flute resting diagonally across sheet music (Default)
From: [personal profile] musyc
Ooooh, good point. Few people on my lists ever post photography or whatnot, and those that do are very good about cuts, so I didn't even think about filesize. My concern is always keeping the images from busting out my layout boundaries. :)

Profile

Dreamwidth style system discussion

June 2017

S M T W T F S
    123
4 567 8910
111213 14151617
18192021222324
252627282930 

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 23rd, 2017 05:26 pm
Powered by Dreamwidth Studios