Account name:
Password
(OpenID?)
(Forgot it?)
Remember Me
You're viewing
style_system
Create a Dreamwidth Account
Learn More
Interest
Region
Site and Account
FAQ
Email
Reload page in style:
site
light
Recent Entries
Archive
Member Posts
Tags
Memories
Profile
Dreamwidth style system discussion
Max image width
Max image width
Nov
.
2nd
,
2011
01:37 pm
tropicsbear
posting in
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!
Current Mood:
hopeful
Tags:
entries:image
Flat
|
Top-Level Comments Only
no subject
Date:
2011-11-02 05:55 am (UTC)
From:
musyc
I use this:
.entry-content img { max-width: 500px; }
Change to whatever number works best for you.
no subject
Date:
2011-11-02 06:22 am (UTC)
From:
tropicsbear
Thanks!
no subject
Date:
2011-11-02 11:53 pm (UTC)
From:
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.
6 comments
Reply
Flat
|
Top-Level Comments Only
Profile
Dreamwidth style system discussion
Recent Entries
Archive
Member Posts
Tags
Memories
Profile
April
2025
S
M
T
W
T
F
S
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Links
dw_styles
S2 CSS
S2 Guide
S2 Cookbook
Core2
Tabula Rasa
Most Popular Tags
!needs tag
-
9 uses
!style making class
-
9 uses
!tips and resources
-
17 uses
$account level:paid or premium
-
7 uses
browser issues
-
10 uses
bug
-
9 uses
comments
-
16 uses
comments: reply form
-
7 uses
comments:user icon
-
6 uses
entries:cuttag
-
12 uses
entries:date and time
-
13 uses
entries:entry poster
-
12 uses
entries:interaction links
-
15 uses
entries:links
-
6 uses
entries:management links
-
13 uses
entries:metadata
-
14 uses
entries:subject
-
21 uses
entries:tags
-
13 uses
entries:text
-
17 uses
entries:user icon
-
27 uses
feeds
-
7 uses
header:background or image
-
30 uses
header:title subtitle or page title
-
32 uses
layer:core1
-
24 uses
layer:core2
-
35 uses
layer:theme layer
-
20 uses
layout:brittle
-
8 uses
layout:funky circles
-
7 uses
layout:importing or imported from
-
35 uses
layout:modish
-
6 uses
layout:practicality
-
7 uses
layout:tabula rasa
-
26 uses
layout:transmogrified
-
34 uses
module:custom
-
7 uses
module:navlinks
-
34 uses
module:tags
-
26 uses
modules
-
13 uses
modules:section:two
-
7 uses
navigation strip
-
14 uses
page:background
-
10 uses
page:header footer or background image
-
17 uses
page:height and width
-
6 uses
page:navigation
-
24 uses
pageview:read
-
20 uses
pageview:recent
-
6 uses
styles
-
11 uses
stylesheet
-
11 uses
username:icon
-
9 uses
~color
-
15 uses
~font
-
21 uses
Page Summary
musyc
-
(no subject)
Style Credit
Style:
Radiant Aqua
for
Venture
by
onlyembers
Expand Cut Tags
No cut tags
Page generated May. 31st, 2025 05:10 am
Powered by
Dreamwidth Studios
no subject
Date: 2011-11-02 05:55 am (UTC).entry-content img { max-width: 500px; }
Change to whatever number works best for you.
no subject
Date: 2011-11-02 06:22 am (UTC)no subject
Date: 2011-11-02 11:53 pm (UTC).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.