WordPress installation and setup

  • Dreamhost installation
    • Go to your DreamHost Web Panel
    • Choose Goodies > One-Click Installs
    • Choose WordPress
      • Install to: Choose domain, type in path to where you want the site to be
      • Automatically create database
      • Deluxe Install unchecked
      • Click Install it for me now
    • Wait for email, then follow instructions for setting up an admin user (don’t use admin as username)
    • Log in
  • Setup
    • Site settings
    • User settings
      • Set display name
      • Disable visual editor if you want to use HTML
    • Where content goes
      • Site title (Settings > General)
      • Pages and posts
      • Menus (Appearance > Menus)
      • Sidebars (Appearance > Widgets)



For our next assignment, we will be recreating the exercise found here. The full text of Aesop’s Fables can be found here.

A rubric for this assignment will be available next week, but the basic requirements are:

  • The title and full text of three fables.
  • Each fable styled for desktop and mobile view.
  • A minimum of two fonts per fable.
  • A minimum of one image per fable.
  • Each fable’s design should be unique – no reusing fonts or images.

Good resources for images include Unsplash and Subtle Patterns.


Helpful CSS

Responsive Design

  • Responsive design
    • Examples
    • Getting started
      • New reset stylesheet (in Basecamp)
        • text-size-adjust
        • word-wrap
        • max-width for images
      • New HTML page template (in Basecamp)
      • Using HTML5 elements – ch. 17
        • Note that hgroup has been deprecated
      • Set html font size to 100% in style.css
  • Flexible layouts
    • Percentages
      • Use percentages for layout widths
      • How to do percentages inside of percentages
    • rem
      • Used instead of pixels for font-size, border, as well as margin and padding in some cases
      • Target ÷ context = result (24px ÷ 16px = 1.5rem)
        • Context is the font size of the html element (16px).
        • Put your math in a comment next to the result.
      • Continue using em for line-height
  • Borders in flexible layouts
    • CSS for divs with borders: box-sizing: border-box;
    • Counts padding and border as part of width
  • Media queries
    • Will mostly use ones based on width (max-width or min-width)
    • Other options available
    • General viewport widths
      • Newest iPhones – 375-414px
      • Older iPhones – 320px
      • iPads – 1024px by 768px
      • Other tablets – 1280px by 800px
      • Others
    • Web inspector’s responsive design mode
    • Using multiple media queries
      • Largest to smallest
      • Multiple values
  • Flexible images
    • max-width: 100%; will work most of the time
    • background-size: cover; (example) and background-size: contain; (example)

Example media query

@media screen and (max-width: 414px) {
        /* alternate CSS here */

Sass Basics


sudo gem install sass

Enter computer password


pwd to show current folder

cd and path to your site to get to correct folder

sass --watch --style expanded sass/style.scss:style.css to run Sass



@import "reset"; to import _reset.scss

Indenting &:hover, etc.


$variable: value;

Media queries

$viewport-ipad: 1024px;
$viewport-iphone: 414px;

@mixin responsive($viewport-width) {
    @if $viewport-width == ipad {
        @media screen and (max-width: $viewport-ipad) {
    @else if $viewport-width == iphone {
        @media screen and (max-width: $viewport-iphone) {


@include responsive(iphone) {