Hướng dẫn nâng cao Layouts với Flexbox trong Drupal

Hướng dẫn nâng cao Layouts với Flexbox trong Drupal

CSS layout model

Mediacurrent's Mario Hernandez talks about the CSS layout model of the future. It's a pretty cool look at Flexbox.

If you’ve been doing web design and development for a while you may remember the days when creating website layouts involved tables or browser specific techniques. Things got a lot better when we began using floats for creating layouts and this proved to be extremely successful. In fact, this technique is still widely used by most developers and designers because it works well and it allows us to build pretty sophisticated layouts.

>> Hướng dẫn làm việc với Drupal Calendar Module năm 2015

>> Giải quyết vấn đề profile PHP memory với Drupal 7

There are problems, however, with float layouts which, if not properly addressed, can create major issues including the lack of vertically align content and clearing floats which if not properly handled can break our layouts. There is no float center and when not clearing floats the right way we can end up with a lot problems in our hands. Enter The Flexbox Layout (Flexible Box) module, which is currently a W3C Last Call Working Draft).

DrupalCon 2015 in Los Angeles

The flexbox layout is direction-agnostic as opposed to the regular layouts (block which is vertically-based and inline which is horizontally-based). While those have served us well, they are not as flexible for the reason outlined above. One of the biggest advantages flexbox is the ability expands items within a flex container to fill available free space, or shrinks them to prevent overflow.

Flex items can be arranged in any direction as individual items or group of items which is something that is extremely hard to do with the current float technique. Below is a presentation I gave at the recent DrupalCon 2015 in Los Angeles where I go into detail about what flexbox is, how it works and how to better understand its various properties. Take a look at it for a more in-depth explanation of flexbox and how it solves many of the problems we currently face with float layouts.

Bạn thấy bài viết này như thế nào?: 
No votes yet
Ảnh của Tommy Tran

Tommy owner Express Magazine

Drupal Developer having 9+ year experience, implementation and having strong knowledge of technical specifications, workflow development. Ability to perform effectively and efficiently in team and individually. Always enthusiastic and interseted to study new technologies

  • Skype ID: tthanhthuy

Tìm kiếm bất động sản

 

Advertisement

 

jobsora

Dich vu khu trung tphcm

Dich vu diet chuot tphcm

Dich vu diet con trung

Quảng Cáo Bài Viết

 
Hướng dẫn thêm CSS Classes vào Blocks ở Drupal 8

Hướng dẫn thêm CSS Classes vào Blocks ở Drupal 8

The idea of Modular CSS really appeals to me, especially having worked on large complex sites with multiple front-end developers collaborating together

Giới thiệu Develop Node.js toàn tập

Giới thiệu Develop Node.js toàn tập

Đây là bài tập đầu tiên sau khi cài đặt node.js vào Win7 nên cũng chưa thạo lắm. Thường thì mình develop node.js thẳng ngay trong cloud. 

Yellow Pages, the Internet, and Browsers

Yellow Pages, the Internet, and Browsers

Some people might say that the yellow pages are the original business data base. Researchers of business history find these time capsules buried in such places as Baker Library at the Harvard Business School. They are a fascinating snapshot of what people once bought and sold.

Công ty diệt chuột T&C

 

Diet con trung