CSS in Practice Printable
CSS in Practice Printable
• Example: my homepage
• Another example:
http://www.w3schools.com/css/demo_default.htm (.html)
• External Style Sheet (.css files) • What style will be used when there is more
• Internal Style Sheet than one style?
– Browser default
• Inline Styles
– External style sheets are included
– Embedded styles (inside the <head> tag) override
• Examples: http://www.w3schools.com/html/html_styles.asp external styles
– Inline styles (inside an HTML element) override both
embedded and external styles
• More: default style, CSS changed by
– Styles modified with JavaScript override all other
JavaScript styles
3 4
5 6
1
Sector Strings, Continue … Selector Strings, Continue …
9 10
11 12
2
How to Select a Font Family? Selecting Font, Continue
13 14
• Fixed width layouts vs. Liquid layouts • How to build a 3-column layout:
– https://medium.com/@space.alpaca/so-what-exactly-is- – https://www.w3schools.com/howto/howto_css_two_columns.asp
the-difference-between-fixed-fluid-adaptive-and- • Steps:
responsive-layouts-and-why-3773272d8481
– Draw your layout
• Fixed width layouts: – Create and style a Container element
– The width of the entire page is set with a specific – Use a Headline Tag for the Header
numerical value
– To get 3 columns, start by building 2 columns
– Then add 2 columns inside the wide second column
• Liquid layouts: – Add in the Footer
– The width of the entire page is flexible depending – Add in your personal style and content
upon how wide the viewer’s browser is
15 16
• https://www.freewebtemplates.com/
• https://www.os-templates.com/free-website-templates
17