# Flexbox Flexbox is more flexible than the `float` property. If flexbox is used it is recommended to keep it flexible and not write too much CSS statements which could limit it's flexibility. The general layout is based on one flexbox container which contains all the elements that should be positioned flexible. Width and height of the items **inside** this container are defined (responsive) by the content and the screen size. The CSS code for activating a flexbox on a container is ```css display: flex; ``` ```css .flex-container { display: flex; } ``` It is applied to a parent container which contains all the elements: ```html
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.