Thanks Matt, but that does not work.

As my example shows, the element may have a percentage width, or it
could be 'auto' (which it would be if not specifically set). What I
need is the 'pixel' measurement that would replicate its current size.
In other words, if it currently is width:90%; and I replace it with
width:985px;, the width *would not change* (assuming 985 is the pixel
equivalent).

On Jan 26, 3:03 pm, Matt <matt.critch...@gmail.com> wrote:
> $('#Test').css('width') ?
>
> On Jan 26, 11:46 am, Kevin Dalman <kevin.dal...@gmail.com> wrote:
>
>
>
> > jQuery has innerHeight/Width and outerHeight/Width methods, but is
> > there a method that can return a 'CSS Height/Width'. A CSS width is
> > the width that would be applied via CSS to achieve a given 'outer
> > width'. This value will differ depending on the box model and other
> > older browser idiosyncracies.
>
> > Here is an example...
>
> > DIV#Test {
> >    width: 90%;
> >    height: auto;
> >    padding: 7px;
> >    margin: 11px;
> >    border: 3px solid #000;
>
> > }
>
> > <DIV id="Test"> line1 <<BR> line 2 <BR> line 3 </DIV
>
> > Now I want to increase the DIV width & height by 1-pixel. To do so, I
> > need the current 'pixel width/height' that is equivent to its current
> > size. AFAIK, $("#Test").innerWidth() will not address this. Is there
> > another dimension method that can?
>
> > I already have a custom function to calculate this, but I'm wondering
> > if I am missing something in jQuery that would simplify my code? If
> > not, I may suggest such a method for jQuery, but want to be sure it
> > doesn't already exist!
>
> > Does anyone have knowledge of this?
>
> > /Kevin- Hide quoted text -
>
> - Show quoted text -

Reply via email to