css3 logo

Introduction

Ciprian Chichirita

ciprian.chichirita@tellence.net
Contents
  1. CSS: intro
  2. CSS: where can you write it
  3. CSS: syntax
  4. CSS: order
  5. CSS: box model
  6. CSS: flexbox
  7. CSS: layouts
  8. CSS: homework
  9. CSS: resources
CSS: intro

Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language like HTML

The name cascading comes from the specified priority scheme to determine which style rule applies if more than one rule matches a particular element. This cascading priority scheme is predictable.

CSS has a simple syntax and uses a number of English keywords to specify the names of various style properties.

A style sheet consists of a list of rules. Each rule or rule-set consists of one or more selectors, and a declaration block.

http://acid3.acidtests.org/

CSS: where can you write it - .css file

<link> inside html <head>

										
											
										
									
CSS: where can you write it

html <head> declaration inside a <style> tag

										
											
										
									
CSS: where can you write it

inline style using style html attribute

										
											
										
									
CSS: syntax

https://www.w3schools.com/cssref/css_selectors.asp

										
											
										
									
CSS: syntax

https://www.w3schools.com/cssref/css_selectors.asp

										
											
										
									
CSS: syntax

https://www.w3schools.com/cssref/css_selectors.asp

										
											
										
									
CSS: syntax

https://www.w3schools.com/cssref/css_selectors.asp

										
											
										
									
CSS: syntax

https://www.w3schools.com/cssref/css_selectors.asp

										
											
										
									
CSS: syntax

https://www.w3schools.com/csSref/css_functions.asp

										
											
										
									
CSS: syntax

https://www.w3schools.com/css/css3_transitions.asp

										
											
										
									
CSS: order

Order of CSS interpretation:

  1. !important
  2. css written inside style attribute
  3. css import inside head tag (as link or as style)
CSS: box model
  • Margin - Clears an area outside the border. The margin is transparent
  • Border - A border that goes around the padding and content
  • Padding - Clears an area around the content. The padding is transparent
  • Content - The content of the box, where text and images appear

box model

									
										
									
								
CSS: flex

flexbox

CSS: layouts

types

  • Static layout
  • Fluid layout
  • Responsive layout
  • Fluid-responsive layout
CSS: layouts

implementation

  • CSS float property (old)
  • CSS flexbox (present)
  • CSS framework (e.g.: bootstrap)
  • CSS grid (new)
  • grid by example
CSS: homework

CSS: resources