IS 337: Website Administration

Lecture for September 29: CSS: Layout

+
-

Topics

Old Way

  • <table>s
  • Not evil, but bad for accessibility and SEO

The CSS Box Model

Formatting Concepts

  • Properties and values toggle
  • Block formatting toggle
    • Blocks are laid out vertically, starting at top.
    • A principal block contains either block boxes or inline boxes, not both.
  • Inline formatting toggle
    • Boxes are laid out horizontally.
    • Horizontal box values are observed, vertical margins ignored.
    • Width and height settings are ignored.
    • Inline boxes are split when necessary.

Readings and Resources

Quick Written Assignment for Next Time

Consider this CSS:

p#motto {
  margin: 10px;
  border-width: 1px 2px;
  padding: 3px 4px 5px 6px;
  width: 20px;
  background-color: #FF00AA;
  color: rgb(10, 128, 255);
}

What is the total width of a paragaph with id motto? What is the total height of this same paragraph?

Creative © 2007 Calvin College and Jeremy D. Frens.
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.