Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 445187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T21:20:43+00:00 2026-05-12T21:20:43+00:00

I experimenting with Flex Styling, and I came across an alignment issue. I have

  • 0

I experimenting with Flex Styling, and I came across an alignment issue.

I have two image components inside an HBox, and the HBox inside a Canvas, which in turn is inside the main Application.

<mx:Canvas id="Navigation"
    horizontalCenter="0"
    bottom="0"
    left="0"
    right="0"
    visible="true"
    height="40"
    styleName="transparent">

    <mx:HBox 
        styleName="ControlContainer"
        horizontalCenter="0"
        width="150">

        <mx:Image id="left"
            source="@Embed(source='left.png')"
            left="0"/>

        <mx:Image id="right"
            source="@Embed(source='right.png')"
            right="0"/>
    </mx:HBox>
</mx:Canvas>

Custom CSS:

    .transparent {
        backgroundAlpha: 0.7;
        background-color: white;
    }
    .ControlContainer {

    }

Well as you see I gave the Canvas with background, and a bit transparency.

But the then there is an HBox, with 150px width, and two images inside it, each image is 40×40, so in this case the HBox would be 150×40 which is nice for what I’m trying to do.

But both images are side by side, and i want the left image aligned to the left side of the HBox, and the right image to the right side.

I’ve tried text-align but nothing, my guess is that Flex CSS doesn’t behave the same way as CSS focused to HTML.

So how can i do that?

PS: If someone knows some good websites
about Flex Styling, Flex CSS or Flex
customization, would be great if you
leave me a few links in comment.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T21:20:43+00:00Added an answer on May 12, 2026 at 9:20 pm

    Spacer tags are useful in situations like these. If you insert one in-between the two images, you can push them to edges of the HBox. While setting the spacer’s width to 100% would seem to indicate that it’s going to take up the entire box, this won’t be the case as the images’ widths will be set to an absolute value as soon as their content has loaded. The spacer will then take up 100% of the remaining width.

        <mx:HBox 
                styleName="ControlContainer"
                horizontalCenter="0"
                width="150">
    
                <mx:Image id="left"
                        source="@Embed(source='left.png')"
                        left="0"/>
    
                <mx:Spacer width="100%"/>
    
                <mx:Image id="right"
                        source="@Embed(source='right.png')"
                        right="0"/>
        </mx:HBox>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.