/    Sign up×
Community /Pin to ProfileBookmark

AlphaImageLoader – scaling width/height to 20px

Hi everybody!

I am using

[CODE]filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=’bullet.png’, sizingMethod=’scale’)[/CODE]

to enable PNG transparency for the image in IE6.

It works fine, but when using scaling, images that are originally smaller than 20 pixels wide or high, are always scaled up to at least 20px wide or high.

In other words, if I have an image of 10×10 pixels and I want to stretch it to 100×10, the width will correctly scale to 100px, but the height pops up to 20px.

Why is this? Pls. download the Zip and take a peek. I need this for creating stylishly cool rounded rectangles with drop shadows for a clients website I am building.

Thanks for the help in advance. ?

A snippet from the Zip:

[CODE] span{
/*background-color: yellow; /* Yellow so we can see the extent of the span */
display: inline-block;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=’bullet.png’, sizingMethod=’scale’);
height: 10px;
width: 50px;
}[/CODE]

[upl-file uuid=3bc8b67f-f14e-4ddc-9e63-3a74e3664165 size=4kB]bullet.zip[/upl-file]

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@CentauriFeb 29.2008 — Try adding font size :[CODE] span{
/*background-color: yellow; /* Yellow so we can see the extent of the span */
display: inline-block;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='bullet.png', sizingMethod='scale');
height: 10px;
width: 50px;
[COLOR="Red"]font-size: 1px;[/COLOR]
}[/CODE]
IE will not allow an element to be smaller than the current font size.
Copy linkTweet thisAlerts:
@josamotoauthorFeb 29.2008 — Dude, that worked straight away! Thanks man, you are the Numbero Uno!!! I owe you ?
×

Success!

Help @josamoto 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 6.17,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...