Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
July 1, 2019 02:15 pm GMT

Making width and flexible items play nice together

The short answer: flex-shrink and flex-basis are probably what youre lookin for.

The long answer

Lets say you want to align an image and some text next to each other with like this:

Now let's say you reach for flexbox to make it happen. Setting the parent element to display: flex; is a good first start.

.container {   display: flex; }

And this results in...

See the Pen
Flex-Shrink Example 1
by Robin Rendle (@robinrendle)
on CodePen.… Read article


Original Link: https://css-tricks.com/making-width-and-flexible-items-play-nice-together/

Share this article:    Share on Facebook
View Full Article

CSS Tricks

A Web Design Community curated by Chris Coyier

More About this Source Visit CSS Tricks