Hmm... adding a DOCTYPE tag at the top of the html seems to resolve
this. Can anyone shed light on this?

However, now I have a different problem: when content grows to the
left, offset().left seems to grow by the overflow size.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/
TR/html4/strict.dtd">
<html>
<head>
    <script type="text/javascript" src="jquery.js" ></script>

        <script>
                $(function() {
                        for(var i=0; i< 300; i++) { 
$("#overflow_text").append('x'); }
                        offset = $("#coverme").offset();
                        $("#moveme").css(offset);
                });

        </script>
</head>
<body dir="rtl">
        <div style="background-color: blue; height: 200px; width: 200px"
id="coverme"></div>
        <div style="background-color: green; height: 100px; width: 100px;
position: absolute;" id="moveme"></div>
        <p id="overflow_text"></p>
</body>

On Jun 30, 8:38 am, iTsadok <[EMAIL PROTECTED]> wrote:
> There seems to be a skew when using offset() in a right-to-left
> layout, but only in Internet Explorer.
> These boxes align perfectly in Firefox and Safari, but IE7 puts the
> green box lower and to the right. Setting the margin doesn't seem to
> have any effect.
>
> <html>
> <head>
>     <script src="jquery.js" ></script>
>
>         <script>
>                 $(function() {
>                         $("#moveme").css($("#coverme").offset());
>                 });
>         </script>
> </head>
>
> <body dir="rtl">
> <div style="background-color: blue; height: 200px; width: 200px"
> id="coverme"></div>
>
> <div style="background-color: green; height: 100px; width: 100px;
> position: absolute;" id="moveme"></div>
>
> </body>

Reply via email to