W3C home > Mailing lists > Public > www-style@w3.org > November 2010

Re: Stretching element without stretching text

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 23 Nov 2010 11:19:08 -0800
Message-ID: <AANLkTik8pnR5dbsv2ZWfxB3E32-3t6T+5cp74uEYPQn9@mail.gmail.com>
To: Jaikishan Jalan <jai.ism@gmail.com>
Cc: www-style@w3.org
On Tue, Nov 23, 2010 at 1:23 AM, Jaikishan Jalan <jai.ism@gmail.com> wrote:
> Hello,
> Currently, applying scaleX or scaleY on an html element scales the element
> but it also scales the text font size inside it. Is there a way to scale an
> element without scaling the text size within it ?

Transforms are a visual transformation that happens after layout has
occurred; in other words, a Transform will *always* affect the text.

Just increasing the dimensions of an element is done by, well,
increasing the dimensions of the element.  If you want to do so
without affecting the placement of surrounding elements, you can use
techniques like what Francois outlines.

On Tue, Nov 23, 2010 at 2:50 AM, Fran├žois REMY
<fremycompany_pub@yahoo.fr> wrote:
> It works in CSS 2.1 and don't use the non-widely implemented
> to-be-standardized CSS3 transform property.

I don't understand this comment - the Transforms spec was accepted by
the WG, and transforms are fairly widely implemented at this point.
It's still in WD for now, but it'll probably start moving upwards in
the next few months.

~TJ
Received on Tuesday, 23 November 2010 19:20:01 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:34 GMT