O'Reilly logo

Web Development with Clojure by Dmitri Sotnikov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required