Positioning Example

Stylesheet: Width:

Part 1

Happy Face

This is a page that we can use to test various ways of positioning content. We'll work with the happy face image.

Part 2

In the second paragraph, there is also no meaningful content. This text doesn't really have much purpose, it's just filler.

This CSS code is being applied above:

figure {
  margin: 0.5em;
}
/*
NOTE: the media selector won't work with the demo's JS width selector,
since the max-width is still large. Resize your browser window or try
on a smartphone.
*/
#happy {
  float: right;
}
@media (max-width: 480px) {
  #happy {
    float: none;
    text-align: center;
  }
}
@media print {
  figure {
    display: none;
  }
}