2 Replies Latest reply on Dec 28, 2006 4:06 PM by phi2265

    centering issue..

    phi2265 Level 1
      heres what i have right now, www.suvozonline.com/newsite

      thanks for everyone that helped with my questions for building the gallery.. its almost complete. i have an asp script that builds an xml file of the gallery directory which is used to populate the tile list.

      now to my question.. i want to take everything i have and center it on the page. i've been looking at the 'horizontalAlign' property for nearly every component i could nest everything in, but it doesnt work, or it separates everything horizontally (wont let me have things next to eachother). does anyone know of a way i can do this?

      the only thing i can think of, is to make a function that gets the width of the window (on load and resize if possible) and divide to find the center and set the x values accordingly.

      any thoughts? thanks.
        • 1. Re: centering issue..
          FlightGuy Level 1
          Could you post your <Application> tag and whatever's immediately beneath it? I'm interested in whether the Application layout is Vertical or Absolute.

          If it's vertical, or if it can be vertical, you should be able to set the horizontalAlign on the Application itself. If it's absolute, you might change the application layout to vertical, set the horizontalAlign to center, and add a Canvas immediately below the Application with all the content. Hard to tell without seeing the MXML, though.


          Nice site, by the way
          • 2. Re: centering issue..
            phi2265 Level 1
            nice.. that was exactly it.

            how you described it was exactly how i had it made.. which was why i couldnt understand why it wasnt working.

            the application layout was set to absolute, i changed to vertical.
            and the canvas 'holding' everything was set to 100% width and height, which i changed to fit the content.

            thanks a lot.