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

 

Bài 4 nodejs: non-Blocking I/O and Asynchronous Events

Có hai yếu tố mạnh mẽ nhất làm Node.js thông dụng trong thời gian thật ngắn: Cả server và browser có thể cùng điều hành bởi 1 ngôn ngữ lập trình

Co phieu samsung

Sau vụ kiện với Apple cổ phiếu Samsung giảm 7%

Cổ phiếu của hãng điện tử khổng lồ Hàn Quốc đã giảm tới 7% sau vụ kiện với Apple. Đây là mức giảm thấp kỉ lục nhất trong 4 năm qua.

Làm đẹp tường Facebook của bạn qua video

Cách thức làm cũng hết sức đơn giản.Riêng bản thân mình rất thích cái này.

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

 

Diet con trung