Good ideas. Thanks.
[EMAIL PROTECTED] wrote: > > > I agree with Brandon - you are usually better off wrapping your > content in a #wrapper div. > Also, I'm not sure why you need to do this programatically. > With your current code, set position:relative on the body tag - now > you should be able to absolutely position any child of the body tag > treating the upper left corner of the body as 0,0. > > christoph > > On Apr 8, 8:04 pm, "Brandon Aaron" <[EMAIL PROTECTED]> wrote: > >> And actually dealing with the body tag and getting its offset can be a >> pain. Especially if you use position instead of just margin. I would >> suggest using a div to center your content. >> >> -- >> Brandon Aaron >> >> On 4/8/07, PragueExpat <[EMAIL PROTECTED]> wrote: >> >> >> >> > The body of my page is centered. It is 800px in width. I have a div >> that I >> > need to be absolutely positioned over the body, so I am trying to get >> the >> > left position of the (centered) body tag using the dimensions.js offset >> > method. >> >> > In IE I get the correct left position, but in FF I get 0. >> >> > When I ask for the left position of the first element in the body, IE >> says 0 >> > while FF gives the correct number (even taking into account the >> centered >> > body). >> >> > $(window).width() does work in both browsers, so I could use that to >> figure >> > out where the centered body is, but I was just wondering if others have >> had >> > success finding the position of a centered body tag. >> >> > Thanks! >> > -- >> > View this message in >> context:http://www.nabble.com/dimensions-offset%28%29-and-centered-BODY-tag-t... >> > Sent from the JQuery mailing list archive at Nabble.com. > > > -- View this message in context: http://www.nabble.com/dimensions-offset%28%29-and-centered-BODY-tag-tf3544527s15494.html#a9919683 Sent from the JQuery mailing list archive at Nabble.com.