Gather Workshops Logo

CSS Basics

Prettifying your page

Background

Let's start by adding a background image to your site.

html {
    background-color: black;
    background-image: url('http://tiny.cc/swirls');
}

Got it working?

Now choose a pattern of your own from Subtle Patterns.

Styling Paragraphs

p {
    color: red;
    font-size: 14px;
    line-height: 150%;
}

Centered Paragraphs

p {
    color: red;
    font-size: 14px;
    line-height: 150%;

    width: 700px;
    margin: 0 auto;
}

Defining Classes

.important {
    color: green;
    font-size: 26px;
    font-weight: bold;
}

Applying Classes

<p class="important">
    I love bunny rabbits!
</p>

Loading...