forlooptanzania / ride-my-way

Car pooling app (of developers) by developers for developers in Tanzania
22 stars 6 forks source link

The summary on learning and exercising on CSS #24

Open veemish opened 5 years ago

veemish commented 5 years ago

CSS

The word CSS stands for Cascading Style Sheets.

3 Methods can be used when adding CSS.

  1. Inline CSS. This is done by adding directly into the THML elements. eg: <h1 style="color: red">Heading<h1> its strictly not advised and it looks very unprofressional.

  2. Internal CSS This done by adding style tags within a single document. eg; <style type="text/css"> h1 {color:red} </style>

3. External CSS
This is done by linking separate CSS file to an HTML file. that is to say;

in an HTML doc it will look like this; <link rel= "style sheet" type="text/css" href="css/style.css"> the css in the href represents the actual folder the _style.css _ is in. if it was in the same folder it would be only href ="style.css".

Difference between class and id in CSS

margin is the distance or space outside the border, top, bottom, right, left.

the space between the element and its border. from the top, bottom, right, left.

Thats it to the short summary on CSS

veemish commented 5 years ago

@BenMaruchu , @joshuamabina ,