Now that we've battled through getting the proper content on the homepage of the Almanac, we can dig into some actual styling with CSS.

We decided to go with a handwriting font for some bits of this design. We browse through some fonts on Dafont, and end up downloading Shadows Into Light. The download comes with the font in a format that will work on the desktop, but not all the formats needed for @font-face. So, we run it through Font Squirrel.

We move the fonts into our directory structure where they are supposed to be. Then we copy and pase the @font-face syntax from elsewhere in the project into our Almanac-specific CSS and change the names of the fonts and stuff.

We spend the rest of the time poking and prodding the CSS getting the layout correct, setting colors, and whatnot. It's actually a pretty fun an interesting CSS challenge getting it all laid out correctly. After all, we have very little control over the HTML output. It's just nested lists. So we have to target and float things just right to get the exact layout we envisioned in Photoshop.


  1. daniel.jeffery
    Permalink to comment#

    So what is the latest with needing to have a SVG font for iOS etc? No longer required? Cheers!

Leave a Comment

Posting Code

We highly encourage you to post problematic HTML/CSS/JavaScript over on CodePen and include the link in your post. It's much easier to see, understand, and help with when you do that.

Markdown is supported, so you can write inline code like `<div>this</div>` or multiline blocks of code in triple backtick fences like this:

  function example() {
    element.innerHTML = "<div>code</div>";

We have a pretty good* newsletter.