View on GitHub

learning-journal

this site is for 102d9 class

css

it uses rules to enable you to control the styling and layout of web pages and how your content will appear

A CSS rule contains two parts: a

Note that you should add a link in the html file to link it with the css file as below:

 <link href="css/styles.css" type="text/css"    rel="stylesheet" /> 

you should add the link after the in the head so it doesnt apper in the website

there are wide variety of CSS properties :

you can change the background color of your website by adding the tag body befor the command

  body { 
          background-color: rgb(185,179,175);}  
           }

if you want to change the size of the img :

tag name img  {
    width : 100px
    height : 150px
}

 tag {
    text-align : center;
}

tag { text decoration; }

tag {
    display : inline;
}

tag { margin : value }

tag { pading : value }



- id selector : Matches an element whose id attribute has a value that matches the one specified after the pound or hash symbol

#name of the id { properety : value; }


- class selector : Matches an element whose class attribute has a value that matches the one specified after the period (or full stop) symbol
 

.item { property : value; }

```