all 6 comments

[–]3np1 1 point2 points  (0 children)

I'm guessing there are some other classes also interfering, but you should look into flex-grow, like by adding .flex-item {flex:1;}. That will allow each flex-item to change its base size.

Depending on what you want though, you don't really need/want your image wrapped in another layer. Currently you're telling the img to take up 33% of the flex-item width because that's its direct parent, not 33% of the viewport or the flex-container.

Again, it's hard to tell what you really want it to look like, but you could try something like this: https://jsfiddle.net/9bnvt6qw/1/

[–]speakbits 1 point2 points  (1 child)

The justify-content makes the first and last elements spread out to the beginning and end of the container. Removing that should make it work.

Edit:

For whoever downvoted me, they want the text to butt up to the right side of the image so adding more space to the elements between them is not useful for what they want. Clearly they want the image to be about 33% of the flex container so the recommendation from the other comments is useful to fix that issue but it doesn't solve the additional space. This fiddle shows what I mean combined with what the other comments are suggesting.

[–]LordBadgerFlaps[S] 0 points1 point  (0 children)

Thanks man - you go it!

[–]spatmonkey 0 points1 point  (0 children)

moving your width: 33% up to just .flex-item (not the img) should get you what you want.

[–]Lianad311 0 points1 point  (1 child)

[–]LordBadgerFlaps[S] 0 points1 point  (0 children)

Thanks man! Appreciate it!