Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8335599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T03:43:21+00:00 2026-06-09T03:43:21+00:00

I have the following css rules: -webkit-transform: scale(0.5); /* Saf3.1+, Chrome */ -moz-transform: scale(0.5);

  • 0

I have the following css rules:

  -webkit-transform: scale(0.5);  /* Saf3.1+, Chrome */
     -moz-transform: scale(0.5);  /* FF3.5+ */
      -ms-transform: scale(0.5);  /* IE9 */
       -o-transform: scale(0.5);  /* Opera 10.5+ */
          transform: scale(0.5);

Which I intend to apply to a div in order to scale it, including all its contents, images, etc, to 50% its size while keeping the same center. As you probably know the rules I listed do exactly that, except for IE7-8.

According to this site, the equivalent, MS proprietary rule would be:

   /* IE8+ - must be on one line, unfortunately */ 
   -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.5, M12=0, M21=0, M22=0.5, SizingMethod='auto expand')";

   /* IE6 and 7 */ 
   filter: progid:DXImageTransform.Microsoft.Matrix(
            M11=0.5,
            M12=0,
            M21=0,
            M22=0.5,
            SizingMethod='auto expand');

However these don’t seem to actually resize the contents of the div, it seems to shift its position but that is all.

CSS3Please.com reports different matrix values to be the equivalent for scale(0.5):

filter: progid:DXImageTransform.Microsoft.Matrix(/* IE6–IE9 */
                     M11=0.9999619230641713, M12=-0.008726535498373935, M21=0.008726535498373935, M22=0.9999619230641713,SizingMethod='auto expand');

I’ve tested these aswell, but the effect was the same; the div seemed to change its position, but the actual size of its contents remained unchanged.

Finally I’ve tried transformie.js, which calculates the matrix via sylvester.js automatically as you assign the transform property, but the end result was still:

M11=0.5, M12=0, M21=0, M22=0.5

Exactly the same as the one I tried first, which seemingly did do nothing other than shift the position of the div.

I would try cssSandpaper.js, but it looks pretty bloated for what I intend to do, plus there’s no jQuery port and I don’t feel like adding cssQuery to the project only for that. Chances are the results would be the same as what transformie.js generates though, because it seems to use sylvester.js aswell.

Edit: I also tried this which seems to come from microsoft directly, and suggests the following matrix calculation method:

function resizeUsingFilters(obj, flMultiplier) {
    // If you don't do this at least once then you will get an error
    obj.style.filter = "progid:DXImageTransform.Microsoft.Matrix(M11='1.0', sizingmethod='auto expand')";
    // Resize
    obj.filters.item(0).M11 *= flMultiplier;
    obj.filters.item(0).M12 *= flMultiplier;
    obj.filters.item(0).M21 *= flMultiplier;
    obj.filters.item(0).M22 *= flMultiplier;
}  

Unfortunately this does not scale the contents of the div itself either. It looks like this may not be possible at all, but:

How can the modern transform: scale be simulated in IE8-7, in such a way that it actually resizes inner div contents aswell?

Perhaps I’m looking for something that doesn’t exist, but I wanted to be sure. All the tests have been done using IE9 in compatibility mode for IE8 and IE7 (so far it has always done the job, I don’t believe it’s unreliable but feel free to correct me if you think otherwise)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T03:43:22+00:00Added an answer on June 9, 2026 at 3:43 am

    I’m a little confused by your explanation. This fiddle in IE7-8 scales the inner elements down for me just fine with the first set of code you posted (though you indicate it was not scaling, only changing position). What that code does not do (and cannot do) is scale it from the center point (it is from the upper left), and the matrix transform cannot accommodate a translation (it only “Resizes, rotates, or reverses the content of the object”), so it is not “keeping the same center” as you indicate you desire.

    There is a page I found similar to the transformie.js you noted in performing transform, but this other page speaks to the issue of the transform origin being centered. Ultimately, to get the appearance of being scaled on center, you must include a calculation of some kind to do a shift of the element using position: relative.

    In this fiddle I’ve made it easy on myself to do such a calculation manually by setting a width on the wrapping div and knowing the height based on the inner sizes. This could get complicated with any dynamic sizing, but the link above I believe gives the calculations to do it dynamically using javascript (JQuery) with the sylvester.js as well.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following CSS rules applied to a DIV: .icon { position:relative; display:
I have defined a fieldset in HTML, and applied the following (simple) CSS rules
I have two CSS rules following each other: .some td:first-child:before { content:url('path/to/image.png') ; }
I have a ul/li based side menu, styled with two CSS rules, the following
We have a CSS file with some rules similar to the following: .directory-result ul
I have a table with the following CSS rules applied: table { border-collapse: collapse;
I have a CSS style which sets up a particular '-webkit-border-image' property for an
I have the following CSS rules: .bookItem:hover { background: rgba(0,150,255,0.1); } .selected { background:
I have following CSS: table tbody tr:last-child td { padding-top: 7px; border-bottom: 0; }
I have the following css: .btn_container { cursor: pointer; font-family: Tahoma,Verdana,Arial; font-size: 11px; padding:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.