HOME | DD

vivienn-art — CSS properties

#css #html #tutorial
Published: 2014-11-04 20:31:36 +0000 UTC; Views: 610; Favourites: 0; Downloads: 0
Redirect to original
Description

What is a CSS? You can read this , if you're interested in it.

I'm gonna explain some basic CSS properties wich is used very often. So let's get started.

Background
There are more versions of the background property.

background: #000000;

background: url(IMAGE URL);

background-image: url(IMAGE URL);
background-repeat: repeat-y;
background-color:#000000;

In this one we have a background image repeated only vertically, and a color for the rest of the background (left and right side).

Font properties

font-family: georgia;
font-size: 9pt;
color:#000000;
text-align: justify;
line-height: 14px;
letter-spacing: 1px;

Explanation

Font-family: the name of the font you want to use.

Font-size: the size of the font wich can be pt (point), px (pixel) and more, but I only use these. If you wanna know more, click here !

Color: The color of the font, wich can be HEX (starting with #), RGB (3 numbers separated with a comma) or RGBA (same as RGB only woth opacity).

For example let's see black:

  • color: #000000;
  • color: rgb(0,0,0);
  • color: rgba(0,0,0,0.5); /* with 50% opacity */

Text-align: align of the text, wigh can be center, left, right and justify.

Line-height: the height of the line in pixels.

Letter-spacing: space between the letters. I mostly use 1px or 2px. Too big space don't look so well.

Other properties

Border

border: 1px solid #000000;

Instead of solid, you can use dotted, dashed, double... I don't use the rest to be honest. But here  are more.

border-left: 1px solid #000000;

You can make left, right, top and bottom border using different colors.

Related content
Comments: 0