
Thanks so much for joining this course!
Now, let's make sure you get the most out of this course :)
Learn about what Flexbox is and what you can do with this new CSS box model to make your job easier and work more productively.
Flexbox is supported by 97.5% of users worldwide (Feb 2017, caniuse.com) with prefixing. Only IE 10 and below, and old Android browsers are not supported.
Thus, you can now finally start using Flexbox for most audiences to use very concise and beautiful solutions for tasks that have been unnecessarily complicated before.
Prefixing can be done using intelligent code editors, online tools, or build tools.
There is no setup required to use Flexbox, it's part of the CSS 3 standard and not a framework or library. Of course you should have a code editor that knows Flexbox and can offer autocomplete etc., such as Sublime Text, Atom or an IDE.
Flexbox uses the concepts of main axis and cross axis. If the flex container is defined as a row, the main axis will be horizontal and the cross axis thus vertical. If the container is a column layout (defined via flex-direction later), it's the other way around.
The cross axis is always perpendicular to the main axis.
It's important to understand this concept to know what the effect the Flexbox properties will have later on in this course.
In Flexbox, you can define the flex container to have a row or column layout using either flex-direction: row or flex-direction: column.
Also, if you want the flex container to be filled from the end of the main axis (e.g. from the right in a row), you can add reverse to the values: flex-direction: row-reverse or flex-direction: column-reverse.
Valid values are:
With justify-content, you can specify how flex items will align along the main axis and what spacing they'll have.
Valid values are:
With align-items, flex items can be aligned along the cross axis. For example, align them at the top or bottom (of a row).
Valid values are:
To create multiple rows or columns, you can enable flex-wrap by using either wrap or wrap-reverse as the default, in contrast to the default value nowrap.
This way, flex items will flow into the next or column once it would overflow. With flex-wrap: nowrap, it may well happen that your flex container will overflow.
Valid values are:
Once you have multiple rows or columns, you will probably want to control the alignment and spacing of these rows/columns. This is exactly what align-content is for, which is essentially the same as justify-content but for the cross axis. Thus, align-content only makes sense once you have more than one row or column.
Valid values are (same as justify-content):
With order, you can change the order of your flex items independent of their actual order in the HTML markup. This allows for more dynamic layouts without relying heavily on JavaScript.
The default value for order is 0, thus you have to use a negative number to move an item to the front.
Valid values are:
In Flexbox, align-self allows you to override whatever basic layout you set via justify-content. Normally, you would of course do this only for specific flex items which should not follow the parent layout.
Valid values are:
By default, flex items will not take up remaining space in their parent. With Flexbox, you can simply set flex-grow to 1 or above to allow a flex-item to fill remaining space.
If multiple flex items have flex-grow set to >0, the remaining space will be split up between them depending on their flex-grow number - the higher the number is, the more they will expand. For details about the calculation, check the video.
Valid values are:
If the flex container cannot contain all its items with their specified size, the flex items will by default be allowed to shrink in order to fit. However, Flexbox will only shrink items to some degree (depending on their content and padding) so the flex container may still overflow.
You can disable shrinking for flex items by setting flex-shrink to 0. Similarly, larger values for flex-shrink will make it shrink more compared to other items.
Valid values are:
In Flexbox, flex items will only adhere to width and height properties if there is no value for flex-basis specified. However, the best practice is to use flex-basis which will refer to width in row containers and to height in column containers.
When calculating the size of each flex item, the flex-basis value will be evaluated first. Only after that, flex-grow and flex-shrink will be used to divide up remaining (or overflowing) space.
Valid values are:
This first solution for Flexbox grids uses minimal markup and CSS code but is already powerful enough for a majority of use cases.
Each grid row will be in its own container, with all elements spanning the same size inside the container via flex: 1. You can use this for teasers showing advantages of your product, review blocks or any other simple multi-column module.
In this solution, you'll create more flexible grids with Flexbox which use flex-wrap to create galleries with multiple rows in one flex container. Also, via classes with different flex-basis values, you'll be able to define how much space each flex item should take up.
This solution is for more advanced galleries where the items in one row should not necessarily be of the same size.
Ever tried vertical-align: middle to no avail? Well, it only works for inline elements and table cells. Finally, with Flexbox you can center any element with just one or two lines of code. This is one of the things that should have been possible in CSS right from the beginning.
Using a flex container and align-items: center, you're now able to vertically center any element inside a flex container. This tutorial shows you two different use cases for this.
A media object is a module with a picture and some content, possibly nested. Think comment sections on a blog. It's a highly useful and reusable module made popular by the OOCSS approach (object-oriented CSS).
Here, you'll learn to easily create flexible media objects using Flexbox which are highly maintainable and fulfill more requirements than described above. In the video, we'll discuss all we want the media object to be able to do.
The Holy Grail Layout is essentially a 3-column layout with a header and a sticky footer where all columns should have equal height at all times, the footer should be sticky, and the HTML markup for the content should come before the markup for both sidebars.
Implementing this layout with CSS was only possible with some kind of compromise before. With Flexbox, you're finally able to use a Holy Grail Layout. In this lecture, I'll show you how.
모든 Flexbox 속성에 대한 정보가 담긴 하나의 PDF 파일입니다.
강의 내용 전체를 하나의 PDF 파일에 정리한 것입니다. 강의 초반에 제공한 코드를 수정해 가며 비교해 볼 수 있습니다.
All you've learned in this course!
Let me know if you have any suggestions for another example of Flexbox in practice :)
저의 다른 웹 디자인 & 개발 강의를 10 달러에 만나보세요.
본 강의에서는 다음 Flexbox 활용법을 다룹니다:
요소 수직 정렬하기
최신 스타일의 그리드 생성하기
남는 공간 채우기
요소 사이 여백 설정하기
완전한 웹 페이지 레이아웃 구현하기
기타 수많은 Flexbox 기능
본 강의에서는 다음과 같은 Flexbox의 모든 속성들에 대해 다룹니다:
플렉스 컨테이너:
flex-direction
justify-content
align-items
flex-wrap
align-content
그리고 플렉스 아이템:
order
align-self
flex-grow
flex-shrink
flex-basis
flex
마지막 부분에서는 실제 Flexbox 사용 예시를 함께 보며 어떤 레이아웃을 만들 수 있는지 살펴봅니다:
같은 행에서 동일한 열 너비를 가지는 간단한 Flexbox 활용 그리드
다양한 열 너비를 가지는 고급 Flexbox 그리드
세로 가운데 정렬을 사용한 요소들의 수직 정렬
미디어 객체 패턴(자주 사용되는 OOCSS 패턴)
성배 레이아웃(사이드바와 푸터가 있는 완전한 웹 페이지 레이아웃)
보너스: 강의와 함께 다섯 가지를 더 제공드립니다.
수강생들의 이해를 돕기 위해 언제나 모든 질문에 대답해 드리고 있습니다. 궁금하신 점이 있다면 언제든 "영어로" 질문해 주세요
고품질의 수작업 영문 및 한글자막을 강의 영상과 함께 제공합니다
3개의 연습 미니 프로젝트를 통해 Flexbox를 실제로 사용해 보고 배운 내용을 웹 디자인에 적용해 생산성을 향상시킬 수 있도록 도와드립니다.
보너스로 Flexbox를 사용하면서 언제든 배운 내용을 다시 확인하고 참고할 수 있는 Flexbox 복습 노트를 제공합니다.
추가로 Flexbox 데모 코드를 제공합니다. 이 코드를 통해 강의에서 배운 모든 속성과 레이아웃을 웹 브라우저에서 실습해 보고 그 결과를 실시간으로 확인할 수 있습니다.
본 강의를 수강한 수강생들의 후기입니다.
정말 좋은 강의입니다. 벌써 Peter의 강의를 두 번째 수강하고 있네요.
내용을 정말 쉽게 설명해 줍니다.
- Ahmed
정말 마음에 드는 강의입니다. 필요한 모든 내용을 정말 상세하게 가르쳐 주고 수강생의 질문에 대해 누구보다도 빠르게 답변해 줍니다. 멋진 강의를 제공해 줘서 고마워요, 앞으로도 다른 강의들 기대하고 있습니다!
- Ana
굉장히 도움이 되는 강의입니다. Peter는 처음부터 끝까지 내용을 빈틈없이 설명해 주고 제 질문에 대해 언제나 하루도 안 되어 대답을 해 주었습니다.
- Dunja
필요한 정보를 쓸데없는 내용 없이 빠르고 간결하게 설명해 주는 강의입니다. 추가 정보와 참고할 문서들에 대한 설명을 함께 제공하는 점도 마음에 들었습니다. 값어치를 하는 강의라고 생각합니다.
- Robert
수강생들이 이처럼 좋은 후기를 남겨주어 정말 기쁩니다 . 이전 수강생들과 마찬가지로 여러분에게 최고의 강의를 제공하기 위해 노력하겠습니다.
1강에서 뵙겠습니다. :)
- Peter