1

I am trying to learn more about flexbox. So, I give myself projects to make solely in flexbox.

Right now I am trying to make a bar with 2 items above it, One at 50% of the width of the bar and another at 100% with the resulting figure looking like below.

_____________X___________X (With the bar continuing under the X)

I thought I could solve this problem with

    .parent {
        display: flex;
    }
    .parent .item-child {
        display: flex;
        justify-content: space-between;
    }
.parent .item-child:first-child {
     padding: 50%;
}

There seems to me like there has to be a better way.

Michael Benjamin
  • 346,931
  • 104
  • 581
  • 701
Case
  • 4,244
  • 5
  • 35
  • 53
  • If my answer isn't useful to you I can just delete it. Let me know if you have any questions. I can also revise it based on your feedback. Cheers! – Michael Benjamin Mar 01 '16 at 17:35
  • You're refreshing polite for this site. I built an answer with flex the day I posted this. It was a while back, but I can surely post what I did later. – Case Mar 07 '16 at 20:39

0 Answers0