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

 
Tính năng của E-Business Platform từ Basel Tourism

Tính năng của E-Business Platform từ Basel Tourism

Basel in Switzerland is one of the leading tourism destinations, known for its art and culture. Major events like "Art Basel" and "Basel World" attracts many visitors from around the world. In addition to business and congress tourism, Basel Tourism

Cải thiện performance trong Drupal 8 nhờ New Quicklink module

Cải thiện performance trong Drupal 8 nhờ New Quicklink module

First, links in the user’s viewport are detected. These are links that the user might want to visit next. When the browser goes idle, the content from the links begins to be saved in the cache

Sega Offers Major Holiday Game Sales

Sega Offers Major Holiday Game Sales

It’s the day before Thanksgiving, and most of you are (job-willing) on the verge of a three or four day weekend. You may spend the time embarking on a boring road trip, avoiding family members, or just hanging out at the house enjoying your days off.

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

 

Diet con trung