The crusade for the Holy Grail layout - DublinJS Lightning Talk

11

Click here to load reader

Transcript of The crusade for the Holy Grail layout - DublinJS Lightning Talk

Page 1: The crusade for the Holy Grail layout - DublinJS Lightning Talk

The Crusade for the Holy Grail Layout

Adrian Sandu, @adysandu6 September, 2016, DublinJS

Page 2: The crusade for the Holy Grail layout - DublinJS Lightning Talk

The Holy Grail Layout

Three-column layout, with header and footer:● Fluid center and fixed sides● All columns have same height● Footer “sticks” to the bottom on low content*● Content appears before sides*● Minimum extra markup*

*) These features are “nice-to-have”, but not a requirement

Page 3: The crusade for the Holy Grail layout - DublinJS Lightning Talk

Frames and Framesets

Disadvantages of frames:● Search engines may not index a website made with frames● Framed websites are not “bookmark friendly” - you can only bookmark the parent page● Frames have accessibility problems● Deprecated in modern versions of HTML

Page 4: The crusade for the Holy Grail layout - DublinJS Lightning Talk

Tables! Tables everywhere!

Disadvantages of table-based design:● Search engines have problems indexing the content ● Complex layouts are very difficult to maintain● Lots of non-semantic markup

Page 5: The crusade for the Holy Grail layout - DublinJS Lightning Talk

Faux-ColumnsBased on Dan Cederholm's idea - http://alistapart.com/article/fauxcolumns Based on Dan Cederholm's idea - http://alistapart.com/article/fauxcolumns

Demo: http://codepen.io/AdrianSandu/pen/GqXgOr

Page 6: The crusade for the Holy Grail layout - DublinJS Lightning Talk

Use JavaScript

Demo: http://codepen.io/AdrianSandu/pen/pbOJRv

Page 7: The crusade for the Holy Grail layout - DublinJS Lightning Talk

Fixed / Absolute Positioning

Demo: http://codepen.io/AdrianSandu/pen/YWOXBR

Page 8: The crusade for the Holy Grail layout - DublinJS Lightning Talk

Tables Everywhere Again (CSS display:table)

Demo: http://codepen.io/AdrianSandu/pen/PzdkOO

Page 9: The crusade for the Holy Grail layout - DublinJS Lightning Talk

Flexbox

Demo: http://codepen.io/AdrianSandu/pen/mEGVjB

Page 10: The crusade for the Holy Grail layout - DublinJS Lightning Talk

Other Approaches

Nested Divisions Border Color

Bottom padding and negative margin

Experimental:

Grid Layout Module | Template Layout

Page 11: The crusade for the Holy Grail layout - DublinJS Lightning Talk

Questions?