About CSS

 

What is CSS?

CSS is short for Cascading Style Sheet; Stylesheets in which layout, color and fonts are defined. Using a stylesheet allows you to keep the design of a website separate from the content and structure.

How does CSS work?

With CSS, you can refer to specific elements of a website. By assigning your own rules to an element, you are able to override our default platform design. This way you could, for example, apply your own logo to the reader, change the background color or adjust the font of the headers.

The header Welcome! on the homepage consists of the following snippet code:

<div id=“main”>
    <section class=“welcome”>

     <h3>
         Welcome!

     </h3>
    </section>
</div>

If you want to change the color and size of the text, you can do this with CSS:

div#main .welcome h3 {
     color: red;

     font-size: 50px;
}

“div#main” refers to the HTML element <div> with ID “main”.
“.welcome” refers to the HTML element <section> with class name “welcome”.
“h3” refers to the H3 title tag containing the text “Welcome!”.

With the CSS above, you would override the default color of this heading with red and change the default size to 50 pixels.

Related: How to create custom CSS for your CMNTY platform.