2 Replies Latest reply on Dec 14, 2012 5:35 AM by Sleepy Lion

    Question about "absolute positioning"

    Sleepy Lion

      Let me ask a basic question.



      This is a simple script written in a html file.


      <img src="images/icon_48_48.png" />

      <span>Hello world</span>

      <script>   $("span").css({"position":"absolute"  ,  "left":  "0px"  , "top":  "0px"});  </script>


      The letters "Hello world" comes at the top-left corner of the browser and overlap  the image.





      On the other hand in case of the Adobe edge ....



        --- Drag and drop a symbol on the stage.

        --- Place it about x:100px y:200px;

        --- Name it ""SymA".

        --- Write a script below in the compositionReady.




                                                        "left":  "10px",

                                                        "top":  "10px"});


      This symbol is not placed at the top-left corner.

      It moves to the lower right by 10px.



      (QUESTION 1)

        How can I place a symbol absolutely.





      (QUESTION 2)

        Why does Edge's behavior differs from that of css on the browser?



        • 1. Re: Question about "absolute positioning"
          joel_pau Level 5



          Your code works fine. You can download a demo file here.

          Your problem can be somewhere else.

          Could you check your properties panel?


          • 2. Re: Question about "absolute positioning"
            Sleepy Lion Level 1

            Thank you for the definite advice.

            Your example worked correctly.


            I tried to create the same thing from a vacant stage, but I failed to do.

            After a dozen times trials, I finally found the reason.

            The cause was "Auto-Keyframe Mode".


            If "Auto-Keyframe Mode" is ON , and if I move the symbol "symA" a little bit by hand, keys are created on the timeline (= 0 sec).

            When that happens, the symbol is not placed absolutely but relatively.


            I don't know if I could say "a bug". But I'm sure it is very hard for ordinary users to find the cause.

            I want Adobe to improve this point.


            In my view, the symbol should be placed at the absolute-position even though  keys are created on the timeline (= 0 sec).