7 Replies Latest reply on Oct 29, 2012 8:02 AM by dtrachtman

    Help positioning objects

    dtrachtman Level 1

      In my index file, before I bring it into Edge,  I have all objects centered on the page this way:

       

      #parallax-bg1 {

                z-index: 1;

                position: fixed;

                left: 58.5%;

                top: 0;

                width: 1130px;

                margin-left: -600px;

                }

       

      I would like to apply those same parameters to all the animations that I add to this file in Edge. Can that be done?

       

      thanks,

      Dan

        • 1. Re: Help positioning objects
          joel_pau Level 5

          Hello,

           

          Hum, i don't know what you mean by "all the animations".

          But, you can try:

          sym.$("Stage").css({

                             "z-index": "1",

                             "position": "fixed",

                             "left": "58.5%",

                             "top": "0",

                             "width": "1130px",

                             "margin-left": "-600px"

          });

           

          or this:

          sym.getSymbolElement().css({

                             "z-index": "1",

                             "position": "fixed",

                             "left": "58.5%",

                             "top": "0",

                             "width": "1130px",

                             "margin-left": "-600px"

          });

           

          You can open Stage/compositionReady or Stage/creationComplete to write these lines.

          • 2. Re: Help positioning objects
            dtrachtman Level 1

            Thanks. That makes perfect sense. I did that but it still isnt working.  I just realized that the animations I make in Edge alos need to be inside one of my divs. Edge won't let me move any of them in the Elements panel to within one of the divs. For some reason I get the circle-with-diagonal-line symbol. Why would this be?

             

            thanks,

            Dan

            • 3. Re: Help positioning objects
              joel_pau Level 5

              I didn't understand this morning. So, you opened an existing html file and then you create several animations.

              So, on your page (index), you've got several divs using the same id: #Stage ?

              • 4. Re: Help positioning objects
                dtrachtman Level 1

                Yes, I opened an existing file and created a couple test animations.

                 

                On my index page I have several divs. None of them are called #Stage. It sounds like Edge uses that id which is why I added the code you gave me.

                 

                I also tried changing "Stage" to "RoundRect" which is the name of one of the animations but that didnt work either.

                 

                Is there a way to put the animation in one of my divs?

                 

                thanks

                • 5. Re: Help positioning objects
                  joel_pau Level 5

                  Well, i have no experience relative to this issue.

                  • 6. Re: Help positioning objects
                    AmintaAdobe Level 1

                    Hi dtrachtman!

                     

                    You have to include a css file in Edge in this way:

                     

                    OnCompositionReady

                     

                    $("<link rel='stylesheet' type='text/css' href='my-css-file.css'>").appendTo("#Stage");

                     

                     

                    In the "my-css-file.css" you have to copy your Index-Css settings, without the div indication (#parallax-bg1) and marking all as "!important" (this overrides the Edge default settings):

                     

                              z-index: 1 !important;

                              position: fixed !important;

                              left: 58.5% !important;

                              top: 0 !important;

                              width: 1130px !important;

                              margin-left: -600px !important;

                     

                    Of course, copy my-css-file.css in the same directory of your index.html

                     

                     

                    Make me know if this works!

                     

                    Davide

                    • 7. Re: Help positioning objects
                      dtrachtman Level 1

                      Thanks Davide,

                      I did all that, but still no dice. It might be something in my code. I posted a separate question a few minutes ago about moving an element inside a div. That might solve it.

                       

                      thanks

                      Dan