RE: RE: [JSMentors] Re: getComputedStyle and marginLeft when auto

2011-05-17 Thread Joel Dart
Hey Joao, I didn't test on Safari 3.2.3 (and my version of opera is newer as well), but in general I'd agree with your results. That said, Safari 5.0.4 (I believe correctly) returns 98px for margin-left on my test case http://jsfiddle.net/RVpPx/4/. This fiddle only tests margin-left, but same

Re: RE: [JSMentors] Re: getComputedStyle and marginLeft when auto

2011-05-17 Thread J.R.
On Monday, 16 May 2011 13:12:27 UTC-3, Joel Dart wrote: > > Hey Sheldon, > > It does return 20px, also, I assumed it was a webkit issue since it failed > on Chrome, but Safari actually does produce the correct value. I’ve > reported the bug to Firefox, Chrome, and Opera. > Here are my test re

RE: [JSMentors] Re: getComputedStyle and marginLeft when auto

2011-05-16 Thread Joel Dart
Hey Sheldon, It does return 20px, also, I assumed it was a webkit issue since it failed on Chrome, but Safari actually does produce the correct value. I've reported the bug to Firefox, Chrome, and Opera. -- To view archived discussions from the original JSMentors Mailman list: http://www.mail

RE: [JSMentors] Re: getComputedStyle and marginLeft when auto

2011-05-16 Thread Sheldon Neilson
s by anyone. From: jsmentors@googlegroups.com [mailto:jsmentors@googlegroups.com] On Behalf Of Joel Dart Sent: 16 May 2011 04:27 PM To: jsmentors@googlegroups.com Subject: RE: [JSMentors] Re: getComputedStyle and marginLeft when auto Whoops yes, sorry got tunnel vision. http://jsfiddl

RE: [JSMentors] Re: getComputedStyle and marginLeft when auto

2011-05-16 Thread Joel Dart
lto:jsmentors@googlegroups.com] On Behalf Of Laurie Harper Sent: Monday, May 16, 2011 10:21 AM To: jsmentors@googlegroups.com Subject: Re: [JSMentors] Re: getComputedStyle and marginLeft when auto Umm, you're constraining #container but testing #test; was that a mistake in your sample cod

Re: [JSMentors] Re: getComputedStyle and marginLeft when auto

2011-05-16 Thread Laurie Harper
Umm, you're constraining #container but testing #test; was that a mistake in your sample code? On 2011-05-16, at 8:59 AM, Joel Dart wrote: > Hey fernando, > I read that part as well, but I think those are more specific cases than the > one I’m dealing with. Take the following example (I define

RE: [JSMentors] Re: getComputedStyle and marginLeft when auto

2011-05-16 Thread Joel Dart
Hey fernando, I read that part as well, but I think those are more specific cases than the one I'm dealing with. Take the following example (I defined the width of the containing block for clarity): /*css*/ #container{ width: 400px; border: 2px solid black; padding: 0; m

Re: [JSMentors] Re: getComputedStyle and marginLeft when auto

2011-05-15 Thread fernando trasvina
you may not like it but its correct 10.3.3 Block-level, non-replaced elements in normal flow The following constraints must hold among the used values of the other properties: 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-righ

RE: RE: [JSMentors] Re: getComputedStyle and marginLeft when auto

2011-05-15 Thread Joel Dart
http://www.w3.org/TR/CSS21/box.html#propdef-margin-left> or 'margin-right' becomes a used value of '0': Yes, for inline-replaced elements that is the case, but my exam

Re: RE: [JSMentors] Re: getComputedStyle and marginLeft when auto

2011-05-14 Thread J.R.
On Friday, 13 May 2011 01:03:53 UTC-3, Joel Dart wrote: > > The problem is not with the rendering in those browsers. The problem is > that the return value of window.getComputedStyle(test, > null).getPropertyValue("margin-left") is “0px” which is clearly not the used > value for margin-left. >

Re: [JSMentors] Re: getComputedStyle and marginLeft when auto

2011-05-14 Thread Balázs Galambosi
On Fri, May 13, 2011 at 2:02 PM, Gregor wrote: > Just as any other numeric value would be. IMO "auto" would be most > reasonable solution, since > > "getComputedStyle() gives the final used values of all the CSS > properties of an element" [1], but the return value only contains only > absolute va

RE: [JSMentors] Re: getComputedStyle and marginLeft when auto

2011-05-12 Thread Joel Dart
The problem is not with the rendering in those browsers. The problem is that the return value of window.getComputedStyle(test, null).getPropertyValue("margin-left") is "0px" which is clearly not the used value for margin-left. Also, to be clear, I wasn't looking for a workaround for this issue