Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 22

CSS

How to Add

For 1 element

For 1 Webpage
For Multi-Pages
CSS SELECTORS

Using Class red-text


Class selector

ID selector
Universal selector – selects all doesn’t matter what class, id, etc. you put
FONT PROPERTIES

Unless it changes <html>, it will also change rem


CSS BOX MODEL
Division – invisible box to group elements
THE CASCADE – SPECIFICITY & INHERITANCE
COMBINING CSS SELECTORS
CSS POSITIONING
If it no ancestor/anc doesn’t have position then desc will go top left corner; always set
the anc position relative for an absolute desc to function
It will stay fixed to the upper left corner even if you scroll down not like the absolute
where it will just stay in the upper left corner and won’t be seen if you scroll down
CSS DISPLAY – block, inline, block-inline, and none(make block disappear)
Block elements can change height & width but can’t bring next line up

Inline cant change height and width

Inline can change height & width and can go to the next line
CSS FLOAT
CREATE RESPONSIVE WEBSITE
MEDIA QUERIES

You might also like