/    Sign up×
Community /Pin to ProfileBookmark

No scaling up for images

Hello developers,

I’m making a photoalbum and wanted a stylesheet to control the size of the image to maximal window size. However I don’t want the image to scale and decreasing clarity this way.

My style can be found at [url]www.few.vu.nl/~ngmdmoel/css/test.html[/url]

This elephant has to scale down when the window is small, but don’t scale up if the window is bigger than the original image size.

Thanks for any answer.

to post a comment
CSS

5 Comments(s)

Copy linkTweet thisAlerts:
@Rossario123Aug 26.2006 — so if i make my window bigger you do not wan't it to scale up in height correct?

but if i lower my window you wan't it to scale correct?

i just wan't to get it right before i start to think ahead of myself.
Copy linkTweet thisAlerts:
@Rossario123Aug 26.2006 — btw i do not believe scalefit and align is actually a property that is support by css but rather a html property.
Copy linkTweet thisAlerts:
@WebJoelAug 26.2006 — There might be something for you in the JAVA forum. I have seen a JAVA applet that takes an image, uses it as a 'thumbnail' and either on-click or hover, scales it up to a defineable 'viewer' size. So the JAVA must be doing some math to make this happen. What you have now is cute, -a 'percentage' of either the width or the height, and the user's browser will re-size on-the-fly.

Or, CSS, something like this?

http://www.cssplay.co.uk/menu/image_magnifier.html

http://www.cssplay.co.uk/menu/image_magnifier2.html
Copy linkTweet thisAlerts:
@nibukauthorAug 27.2006 — Thanks for these answers. To clarify for rosario. The image should take the maximum window space, so increase when the window increases and decrease as well. However it should never increase more than the actual image size.

This without any extra features and dynamics. Only altering the image when the window size changes.

My guess is that it's or very simple and overlooked by my, or indeed impossible with css.
Copy linkTweet thisAlerts:
@Rossario123Aug 27.2006 — you can easily do that with javascript.

but not with css as far as i know.

css cannot specifiy a specific height for it to stop when the window resizes
×

Success!

Help @nibuk spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...