Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Responsive Web Design for Libraries: Get Beyond the Myth of the Mobile Web

Responsive Web Design for Libraries: Get Beyond the Myth of the Mobile Web

An introduction to Responsive Web Design with a basic code walkthrough to get you started making your library website responsive.

Matthew Reidsma

June 25, 2012
Tweet

More Decks by Matthew Reidsma

Other Decks in How-to & DIY

Transcript

  1. LIBRARIES RESPONSIVE WEB DESIGN FOR GET BEYOND THE MYTH OF

    THE MOBILE WEB MATTHEW REIDSMA : GVSU
  2. if (device == iPhone) OR (device == Droid) { //

    Show mobile site } else { // Show “Desktop” site }
  3. if (browser == Mobile Safari) OR (browser == Opera Mini)

    { // Show mobile site } else { // Show “Desktop” site }
  4. http://googlemobileads.blogspot.com/2011/04/complimentary-copy-of-mobile-movement.html 84% 80% 76% 64% 39% AT HOME RANDOM DOWNTIMES

    WAITING IN LINE AT WORK IN THE BATHROOM http://blog.compete.com/2010/03/12/smartphone-owners-a-ready-and-willing-audience/ 61% LIARS
  5. We should embrace the fact that the web doesn’t have

    the same constraints [as print], and design for this flexibility. JOHN ALSOPP, 2000 http://www.alistapart.com/articles/dao/
  6. 600 ÷ 960 = 62.5% 288 ÷ 960 = 30%

    TARGET ÷ CONTEXT = RESULT
  7. 320px Phone - portrait 480px Phone - landscape 600px 7”

    tablets - portrait 768px 10” tablets - portrait 980px #blue-banner-bar width 1024px 10” tablets - landscape, “desktop”
  8. @media screen and (min-width: 480px) { ... } /* Base

    styles */ ... /* Progressive styles */ @media screen and (min-width: 600px) { ... } @media screen and (min-width: 768px) { ... } @media screen and (min-width: 980px) { ... } @media screen and (min-width: 1024px) { ... }
  9. BLOCK ELEMENTS NAVIGATION AT THE BOTTOM ANCHOR LINK TO NAV

    IN HEADER SMALL-SCREEN LAYOUT ENHANCEMENTS
  10. HEADING 1 ANCHOR # INPUT TYPE=”TEXT” INPUT TYPE=”SUBMIT” SECTION #NEWS

    SECTION #EVENTS SECTION #EXHIBITS FOOTER NAVIGATION
  11. h1 { float: left; width: 66%; } header .nomed {

    float: right; width: 33%; } HEADING 1 ANCHOR #
  12. h1 { float: left; padding-left: .65%; width: 65%; } header

    .nomed { float: right; margin-right: 1%; width: 32%; }
  13. INPUT TYPE=”TEXT” INPUT TYPE=”SUBMIT” input[type=”text”] { display: block; margin: 0

    1%; padding: .4em .96%; width: 96%; } input[type=”submit”] { display: block; margin: .5em 1%; width: 98%; }
  14. 320px Phone - portrait 480px Phone - landscape 600px 7”

    tablets - portrait 768px 10” tablets - portrait 980px #blue-banner-bar width 1024px 10” tablets - landscape, “desktop”
  15. FORM IN HEADER TO RIGHT NAVIGATION AT THE TOP ANCHOR

    LINK TO NAV IN HEADER GONE ENHANCEMENTS FOR > 33.75EM
  16. HEADING 1 ANCHOR # INPUT TYPE=”TEXT” INPUT TYPE=”SUBMIT” SECTION #NEWS

    SECTION #EVENTS SECTION #EXHIBITS FOOTER HEADING 1 SUBMIT INPUT NAVIGATION
  17. INPUT SUBMIT h1 { width: 32%; } form { float:

    left; width: 66%; } input[type=”text”] { width: 66%; } input[type=”submit”] { float: right; width: 28%; } HEADING 1
  18. body { display: table; caption-side: top; } nav[role="navigation"] { display:

    table-caption; } nav[role="navigation"] ol { display: table-row; } nav[role="navigation"] ol li { display: table-cell; } NAVIGATION http://adactio.com/journal/4780/
  19. SECTION #NEWS SECTION #EVENTS SECTION #EXHIBITS FOOTER HEADING 1 SUBMIT

    INPUT NAVIGATION SECTION #NEWS SECTION #EVENTS SECTION #EXHIBITS
  20. NEWS & EVENTS ACROSS THE TOP EXHIBITS BELOW IN 3

    COLUMNS ENHANCEMENTS FOR > 64EM HEADING CHANGED TO FULL NAME
  21. FOOTER HEADING 1 SUBMIT INPUT NAVIGATION SECTION #NEWS SECTION #EVENTS

    SECTION #EXHIBITS SECTION #EVENTS SECTION #EXHIBITS
  22. #right-column { float: none; margin-left: 0; width: 100%; } #events

    { clear: none; width: 66%; float: right; } #news { width: 30%; margin-left: 3%; float: right; }
  23. #exhibits { ! width: 100%; ! float: none; ! clear:

    both; } ! #exhibits .exhibit-section { ! float: left; ! width: 31.3%; ! margin: 0 1%; }
  24. h1 span { display: none; } @media screen and (min-width:

    64em) { h1 abbr { display: none; } h1 span { display: inline; } }