Theming

Restoring the Natural Flow of Elements for Drupal 7

Last updated March 5, 2020
Categories

Check your version

This tutorial covers a topic in Drupal 7 which may or may not be the version you're using. We're keeping this tutorial online as a courtesy to users of Drupal 7, but we consider it archived.

Alternate resources

Sprout Video

While it's not forbidden to use absolute positioning in responsive designs, the way that absolute positioning was utilized in the original theme is less than ideal as we work on moving theme toward flexibility, fluidity, and responsiveness. 

In this lesson, we'll focus on putting elements in the header back into the natural flow of the document. We'll refactor some HTML and CSS, removing absolute positioning declarations and change the source order of some elements in our page template file.

Restoring the natural order and flow of the document will make things easier for us down the road as we adapt our components to stack into one-column in small screens.

https://github.com/DrupalizeMe/demo-rwd-7x (checkout branch 07-08-flow-media-queries)