Adding Some Style

As we discussed in Chapter 1, Getting Your Feet Wet, you shouldn’t embed the CSS in your Hiccup templates. Instead, we’ll assign the appropriate ID and class tags to the elements we wish to style. Then we can use those in a CSS file to specify the actual styles for the elements.

First, let’s set a general style for the body of the page. We’ll open the screen.css and set the following style for the body.

picture-gallery-style-tests/resources/public/css/screen.css
 
body​ {
 
margin: 0px;
 
background: #C8D9C9;
 
color: #525952;
 
font-family: ​'Helvetica Neue'​, Helvetica, Arial, sans-serif;
 
font-size: 13px;
 
}

We’ll set the margin to 0 pixels, add background and text colors, and set the default font for the body of our ...

Get Web Development with Clojure now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.