That was a typo on my part with respect to the class/id thing in my example. I tried it a couple of different ways, using long-hand CSS definitions as well as shorthand, too. I will try with the shipping versiont and let you know if it works there.
Walter On Mar 20, 12:59 pm, "T.J. Crowder" <[email protected]> wrote: > Hi, > > The CSS you've quoted is defining a rule for elements with *class* > "foo", not `id` foo, and your quoted test code is using `getHeight`, > not `getWidth`. > > If I make the rule for the `id` "foo" and use `getWidth` and Prototype > 1.7.0.0, it works for me on Safari 5, IE6, IE7, and IE9 on Windows; > and Chrome (let's see, what is it today) 10, Firefox 3.6, and Opera 11 > on Linux:http://jsbin.com/uhofu4 > > So either it's a "feature" of RC2, or something that only shows up on > a Mac (if that's where you're using Safari), or maybe a couple of the > issues with the quoted test code are actually present in the code > you're testing. Or something else. :-) > > HTH, > -- > T.J. Crowder > Independent Software Engineer > tj / crowder software / com > www / crowder software / com > > On Mar 20, 4:24 pm, Walter Lee Davis <[email protected]> wrote: > > > > > I'm using 1.7 rc2 (don't have access to a later version at the moment) > > and it seems like getWidth is only counting the width, and not > > including the border width. The documentation hints that it should > > return the width of the element's layout box. > > > .foo { > > border: 1px solid black; > > width: 498px;} > > > <div id="foo">bar</div> > > > $('foo').getHeight() --> 498 in Safari 5.latest > > > I think it should be 500. Is this just a factor of the version I'm > > using, or is it how it's supposed to work? > > > Walter -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
