SlideShare a Scribd company logo
Creative Web 2.
Linking to files can be done using

a relativ path or and absolute path
An absolute path is…

a path which starts from the domain
Examples of absolute paths!
"
http://domain.com/img/image.png"
"
btk-fh.de/css/style.css
A relative path is…

a path relative from the current file
root
site
imgs
css
← index.html (current file)
Linking from…"
index.html to base.css in folder css
root
site
imgs
css
index.html
base.css
/css/base.css
Linking from…"
index.html to img.png in folder imgs
root
site
imgs
css
index.html
img.png
../imgs/img.png!
(../ moves one directory up)
CSS
Cascading Style Sheets are…"
a language to define the style of
HTML elements
Advantages of css…

separating design (css) from logic !
and structure (html). This makes !
the design easily reusable and !
maintainable."
Linking external stylesheets!
"
<link rel="stylesheet" href="./libs/css/base.css"
type="text/css" media="screen" charset="utf-8" />"
"
href is the relative or absolute path to the file."
"
media is the media the stylesheet is used for, "
mainly screen and print."
In a css file you define a css rule!
"
selector{!
! attribute: value;!
}
A selector tells css which element
to apply the styles to.
#unique ID-selectors start with a # and select
the element with the id unique."
"
e.g. <div id=“unique”>…"
"
IDs can only be used once per html-page."
"
IDs consist of letters A-Z, numbers and
underscore _ NO spaces, or other special
characters.
ID Selector
.reuse class-selectors start with a . and
select all elements with the class reuse."
"
e.g. <div class=“reuse”>…"
"
Classes can be used multiple times per html-
page."
"
Classes consist of letters A-Z, numbers and
minus - NO spaces, or other special
characters
Class Selector
div element-selectors name the tag name
and select all elements of the type div."
"
e.g. <div>…"
"
Element-selectors should be used with
caution because they are not very specific.
Element Selector
Selector weight (importance)
When multiple css rules apply to an element
and change the same property e.g. color the
weight of the selectors defines which one will
win.
div{!
! color: red;!
}!
"
.reuse{!
! color: blue;!
}!
"
#unique{!
! color: purple;!
}
<div id=“unique” class=“reuse”>Text</div>"
A class has more weight
than an element-selector
An id has more weight
than a class-selector
.font-red{!
! color: red;!
}!
"
.reuse{!
! color: blue;!
}
<div class=“reuse font-red”>Text</div>"
Both class-selector have
the same weight, the last
selector in the css file
wins.
.font-red.reuse{!
! color: red;!
}!
"
.reuse{!
! color: blue;!
}
<div class=“reuse font-red”>Text</div>"
Two class-selector have
more weight, than one
selector, so two classes
win.
CSS Selectors are read from !
right to left
Find all li-elements

Find all of those li-elements inside an element
with a class reuse

Find all of those li-elements inside an element
with a class reuse which are inside the
element with the id unique
#unique .reuse li{!
! color: red;!
}!
Optimize css by being specific on the right of
selector."
"
You could add a class .navi to those li-
elements and change the css to
.navi{!
! color: red;!
}!
Javascript
Linking a javascript files!
"
<script type="text/javascript" src=“./libs/js/
javascript.js“></script>"
"
src is the relative or absolute path to the file."
"
Javascript files should always be linked just "
before the closing tag of the body </body>
Javascript

Inside the js file you can write javascript without "
declaring any head, etc. e.g."
"
alert(‘treeeees!’);"
"
This is a function and will create a popup with "
the text treeeees! Which tells you that you "
linked the file correctly.
Patterns
Navigations are build from lists
Typically a navigation is a list of links
<ul>!
! <li><a href=“index.html”>home</a></li>! !
! <li><a href=“about.html”>about</a>!
! ! <ul class=“sub-menu”>!
! ! ! <li><a href=“me.html”>me/a></li>!
! ! ! <li><a href=“cv.html”>CV</a></li>!
! </li>!
</ul>
Navigations are build from lists
Typically a navigation is a list of links
<ul>!
! <li><a href=“index.html”>home</a></li>! !
! <li><a href=“about.html”>about</a>!
! ! <ul class=“sub-menu”>!
! ! ! <li><a href=“me.html”>me/a></li>!
! ! ! <li><a href=“cv.html”>CV</a></li>!
! </li>!
</ul>
Assignments
1. Write 3 html pages with a navi <ul> linking them

together."
• Use the same stylesheet for all three files"
• Add content and style it using css"
• try at lest 5 css3 properties like gradient, 

border-radius, transform, etc."
• try to reuse css styles by using multiple classes 

per element when it makes sense
Assignments
2. Create and link a javascript file with the alert inside,"
so that you see the alert message when you open 

the html file in your browser"
"
3. Read this article to get an idea what JSON is 

http://de.wikipedia.org/wiki/JavaScript_Object_Notation"
"
4. If you know JS already read up on handlebars.js
Lukas Oppermann
lukas@vea.re

More Related Content

What's hot

Introducing Cascading Style Sheets
Introducing Cascading Style SheetsIntroducing Cascading Style Sheets
Introducing Cascading Style Sheets
St. Petersburg College
 
Casc Style Sheets Ii
Casc Style Sheets IiCasc Style Sheets Ii
Cascading Style Sheets (CSS)
Cascading Style Sheets (CSS)Cascading Style Sheets (CSS)
Cascading Style Sheets (CSS)
Harshil Darji
 
An introduction to jQuery
An introduction to jQueryAn introduction to jQuery
An introduction to jQuery
James Wragg
 
Complete Lecture on Css presentation
Complete Lecture on Css presentation Complete Lecture on Css presentation
Complete Lecture on Css presentation
Salman Memon
 
FFW Gabrovo PMG - HTML
FFW Gabrovo PMG - HTMLFFW Gabrovo PMG - HTML
FFW Gabrovo PMG - HTML
Toni Kolev
 
CSS 101
CSS 101CSS 101
CSS 101
dunclair
 
FFW Gabrovo PMG - JavaScript 1
FFW Gabrovo PMG - JavaScript 1FFW Gabrovo PMG - JavaScript 1
FFW Gabrovo PMG - JavaScript 1
Toni Kolev
 
Cascading style sheets (CSS)
Cascading style sheets (CSS)Cascading style sheets (CSS)
Cascading style sheets (CSS)
Harshita Yadav
 
FFW Gabrovo PMG - jQuery
FFW Gabrovo PMG - jQueryFFW Gabrovo PMG - jQuery
FFW Gabrovo PMG - jQuery
Toni Kolev
 
Basic-CSS-tutorial
Basic-CSS-tutorialBasic-CSS-tutorial
Basic-CSS-tutorial
tutorialsruby
 
CSS: a rapidly changing world
CSS: a rapidly changing worldCSS: a rapidly changing world
CSS: a rapidly changing world
Russ Weakley
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
Folasade Adedeji
 
css v1 guru
css v1 gurucss v1 guru
css v1 guru
GuruPada Das
 
Html Styles-CSS
Html Styles-CSSHtml Styles-CSS
Html Styles-CSS
ispkosova
 
Basic css
Basic cssBasic css
Basic css
Gopinath Ambothi
 
Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style Sheets
Marc Steel
 
Week11 Lecture: CSS
Week11 Lecture: CSSWeek11 Lecture: CSS
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Erin M. Kidwell
 
Day5
Day5Day5
Day5
Ann Foley
 

What's hot (20)

Introducing Cascading Style Sheets
Introducing Cascading Style SheetsIntroducing Cascading Style Sheets
Introducing Cascading Style Sheets
 
Casc Style Sheets Ii
Casc Style Sheets IiCasc Style Sheets Ii
Casc Style Sheets Ii
 
Cascading Style Sheets (CSS)
Cascading Style Sheets (CSS)Cascading Style Sheets (CSS)
Cascading Style Sheets (CSS)
 
An introduction to jQuery
An introduction to jQueryAn introduction to jQuery
An introduction to jQuery
 
Complete Lecture on Css presentation
Complete Lecture on Css presentation Complete Lecture on Css presentation
Complete Lecture on Css presentation
 
FFW Gabrovo PMG - HTML
FFW Gabrovo PMG - HTMLFFW Gabrovo PMG - HTML
FFW Gabrovo PMG - HTML
 
CSS 101
CSS 101CSS 101
CSS 101
 
FFW Gabrovo PMG - JavaScript 1
FFW Gabrovo PMG - JavaScript 1FFW Gabrovo PMG - JavaScript 1
FFW Gabrovo PMG - JavaScript 1
 
Cascading style sheets (CSS)
Cascading style sheets (CSS)Cascading style sheets (CSS)
Cascading style sheets (CSS)
 
FFW Gabrovo PMG - jQuery
FFW Gabrovo PMG - jQueryFFW Gabrovo PMG - jQuery
FFW Gabrovo PMG - jQuery
 
Basic-CSS-tutorial
Basic-CSS-tutorialBasic-CSS-tutorial
Basic-CSS-tutorial
 
CSS: a rapidly changing world
CSS: a rapidly changing worldCSS: a rapidly changing world
CSS: a rapidly changing world
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
css v1 guru
css v1 gurucss v1 guru
css v1 guru
 
Html Styles-CSS
Html Styles-CSSHtml Styles-CSS
Html Styles-CSS
 
Basic css
Basic cssBasic css
Basic css
 
Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style Sheets
 
Week11 Lecture: CSS
Week11 Lecture: CSSWeek11 Lecture: CSS
Week11 Lecture: CSS
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
 
Day5
Day5Day5
Day5
 

Similar to Creative Web 2 - CSS

CSS Foundations, pt 2
CSS Foundations, pt 2CSS Foundations, pt 2
CSS Foundations, pt 2
Shawn Calvert
 
CSS.pdf
CSS.pdfCSS.pdf
CSS.pdf
SoniaJoshi25
 
Web topic 15 1 basic css layout
Web topic 15 1  basic css layoutWeb topic 15 1  basic css layout
Web topic 15 1 basic css layout
CK Yang
 
Web Design Course: CSS lecture 1
Web Design Course: CSS lecture 1Web Design Course: CSS lecture 1
Web Design Course: CSS lecture 1
Gheyath M. Othman
 
Creative Web 02 - HTML & CSS Basics
Creative Web 02 - HTML & CSS BasicsCreative Web 02 - HTML & CSS Basics
Creative Web 02 - HTML & CSS Basics
Lukas Oppermann
 
Pfnp slides
Pfnp slidesPfnp slides
Pfnp slides
William Myers
 
Css
CssCss
HTML and CSS crash course!
HTML and CSS crash course!HTML and CSS crash course!
HTML and CSS crash course!
Ana Cidre
 
Intro to HTML and CSS basics
Intro to HTML and CSS basicsIntro to HTML and CSS basics
Intro to HTML and CSS basics
Eliran Eliassy
 
CSS-part-1.ppt
CSS-part-1.pptCSS-part-1.ppt
CSS-part-1.ppt
AshwaniKumarYadav19
 
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation
Shawn Calvert
 
Web Typography
Web TypographyWeb Typography
Web Typography
Shawn Calvert
 
Css
CssCss
CSS Foundations, pt 1
CSS Foundations, pt 1CSS Foundations, pt 1
CSS Foundations, pt 1
Shawn Calvert
 
Sass Essentials at Mobile Camp LA
Sass Essentials at Mobile Camp LASass Essentials at Mobile Camp LA
Sass Essentials at Mobile Camp LA
Jake Johnson
 
Intro to CSS Selectors in Drupal
Intro to CSS Selectors in DrupalIntro to CSS Selectors in Drupal
Intro to CSS Selectors in Drupal
cgmonroe
 
Cascading Style Sheets By Mukesh
Cascading Style Sheets By MukeshCascading Style Sheets By Mukesh
Cascading Style Sheets By Mukesh
Mukesh Kumar
 
Web Programming& Scripting Lab
Web Programming& Scripting LabWeb Programming& Scripting Lab
Web Programming& Scripting Lab
Swapnali Pawar
 
SharePointfest Denver - A jQuery Primer for SharePoint
SharePointfest Denver -  A jQuery Primer for SharePointSharePointfest Denver -  A jQuery Primer for SharePoint
SharePointfest Denver - A jQuery Primer for SharePoint
Marc D Anderson
 
Css introduction
Css  introductionCss  introduction
Css introduction
vishnu murthy
 

Similar to Creative Web 2 - CSS (20)

CSS Foundations, pt 2
CSS Foundations, pt 2CSS Foundations, pt 2
CSS Foundations, pt 2
 
CSS.pdf
CSS.pdfCSS.pdf
CSS.pdf
 
Web topic 15 1 basic css layout
Web topic 15 1  basic css layoutWeb topic 15 1  basic css layout
Web topic 15 1 basic css layout
 
Web Design Course: CSS lecture 1
Web Design Course: CSS lecture 1Web Design Course: CSS lecture 1
Web Design Course: CSS lecture 1
 
Creative Web 02 - HTML & CSS Basics
Creative Web 02 - HTML & CSS BasicsCreative Web 02 - HTML & CSS Basics
Creative Web 02 - HTML & CSS Basics
 
Pfnp slides
Pfnp slidesPfnp slides
Pfnp slides
 
Css
CssCss
Css
 
HTML and CSS crash course!
HTML and CSS crash course!HTML and CSS crash course!
HTML and CSS crash course!
 
Intro to HTML and CSS basics
Intro to HTML and CSS basicsIntro to HTML and CSS basics
Intro to HTML and CSS basics
 
CSS-part-1.ppt
CSS-part-1.pptCSS-part-1.ppt
CSS-part-1.ppt
 
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation
 
Web Typography
Web TypographyWeb Typography
Web Typography
 
Css
CssCss
Css
 
CSS Foundations, pt 1
CSS Foundations, pt 1CSS Foundations, pt 1
CSS Foundations, pt 1
 
Sass Essentials at Mobile Camp LA
Sass Essentials at Mobile Camp LASass Essentials at Mobile Camp LA
Sass Essentials at Mobile Camp LA
 
Intro to CSS Selectors in Drupal
Intro to CSS Selectors in DrupalIntro to CSS Selectors in Drupal
Intro to CSS Selectors in Drupal
 
Cascading Style Sheets By Mukesh
Cascading Style Sheets By MukeshCascading Style Sheets By Mukesh
Cascading Style Sheets By Mukesh
 
Web Programming& Scripting Lab
Web Programming& Scripting LabWeb Programming& Scripting Lab
Web Programming& Scripting Lab
 
SharePointfest Denver - A jQuery Primer for SharePoint
SharePointfest Denver -  A jQuery Primer for SharePointSharePointfest Denver -  A jQuery Primer for SharePoint
SharePointfest Denver - A jQuery Primer for SharePoint
 
Css introduction
Css  introductionCss  introduction
Css introduction
 

More from Lukas Oppermann

BTK Designing for the web 2016 - UX
BTK Designing for the web 2016 - UXBTK Designing for the web 2016 - UX
BTK Designing for the web 2016 - UX
Lukas Oppermann
 
BTK Designing for the web 2016
BTK Designing for the web 2016BTK Designing for the web 2016
BTK Designing for the web 2016
Lukas Oppermann
 
Btk creative-web-03
Btk creative-web-03Btk creative-web-03
Btk creative-web-03
Lukas Oppermann
 
Creative Web 01 - Introduction to the web & web development
Creative Web 01 - Introduction to the web & web developmentCreative Web 01 - Introduction to the web & web development
Creative Web 01 - Introduction to the web & web development
Lukas Oppermann
 
Creative Web 2 - JavaScript
Creative Web 2 - JavaScript Creative Web 2 - JavaScript
Creative Web 2 - JavaScript
Lukas Oppermann
 
Creative Web 2 - Introduction
Creative Web 2 - IntroductionCreative Web 2 - Introduction
Creative Web 2 - Introduction
Lukas Oppermann
 
Contemporary webdesign day 2
Contemporary webdesign day 2Contemporary webdesign day 2
Contemporary webdesign day 2
Lukas Oppermann
 
Contemporary webdesign
Contemporary webdesignContemporary webdesign
Contemporary webdesign
Lukas Oppermann
 
Search Engine Optimization Introduction
Search Engine Optimization IntroductionSearch Engine Optimization Introduction
Search Engine Optimization Introduction
Lukas Oppermann
 

More from Lukas Oppermann (9)

BTK Designing for the web 2016 - UX
BTK Designing for the web 2016 - UXBTK Designing for the web 2016 - UX
BTK Designing for the web 2016 - UX
 
BTK Designing for the web 2016
BTK Designing for the web 2016BTK Designing for the web 2016
BTK Designing for the web 2016
 
Btk creative-web-03
Btk creative-web-03Btk creative-web-03
Btk creative-web-03
 
Creative Web 01 - Introduction to the web & web development
Creative Web 01 - Introduction to the web & web developmentCreative Web 01 - Introduction to the web & web development
Creative Web 01 - Introduction to the web & web development
 
Creative Web 2 - JavaScript
Creative Web 2 - JavaScript Creative Web 2 - JavaScript
Creative Web 2 - JavaScript
 
Creative Web 2 - Introduction
Creative Web 2 - IntroductionCreative Web 2 - Introduction
Creative Web 2 - Introduction
 
Contemporary webdesign day 2
Contemporary webdesign day 2Contemporary webdesign day 2
Contemporary webdesign day 2
 
Contemporary webdesign
Contemporary webdesignContemporary webdesign
Contemporary webdesign
 
Search Engine Optimization Introduction
Search Engine Optimization IntroductionSearch Engine Optimization Introduction
Search Engine Optimization Introduction
 

Recently uploaded

一比一原版(毕业证)早稻田大学毕业证成绩单如何办理
一比一原版(毕业证)早稻田大学毕业证成绩单如何办理一比一原版(毕业证)早稻田大学毕业证成绩单如何办理
一比一原版(毕业证)早稻田大学毕业证成绩单如何办理
taqyed
 
一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理
一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理
一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理
7sd8fier
 
一比一原版(毕业证)长崎大学毕业证成绩单如何办理
一比一原版(毕业证)长崎大学毕业证成绩单如何办理一比一原版(毕业证)长崎大学毕业证成绩单如何办理
一比一原版(毕业证)长崎大学毕业证成绩单如何办理
taqyed
 
哪里办理美国中央华盛顿大学毕业证双学位证书原版一模一样
哪里办理美国中央华盛顿大学毕业证双学位证书原版一模一样哪里办理美国中央华盛顿大学毕业证双学位证书原版一模一样
哪里办理美国中央华盛顿大学毕业证双学位证书原版一模一样
qo1as76n
 
UNIT V ACTIONS AND COMMANDS, FORMS AND CONTROLS.pptx
UNIT V ACTIONS AND COMMANDS, FORMS AND CONTROLS.pptxUNIT V ACTIONS AND COMMANDS, FORMS AND CONTROLS.pptx
UNIT V ACTIONS AND COMMANDS, FORMS AND CONTROLS.pptx
GOWSIKRAJA PALANISAMY
 
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理
n0tivyq
 
ARENA - Young adults in the workplace (Knight Moves).pdf
ARENA - Young adults in the workplace (Knight Moves).pdfARENA - Young adults in the workplace (Knight Moves).pdf
ARENA - Young adults in the workplace (Knight Moves).pdf
Knight Moves
 
Branding de la empresa de Bolt- 2024.pdf
Branding de la empresa de Bolt- 2024.pdfBranding de la empresa de Bolt- 2024.pdf
Branding de la empresa de Bolt- 2024.pdf
PabloMartelLpez
 
AHMED TALAAT ARCHITECTURE PORTFOLIO .pdf
AHMED TALAAT ARCHITECTURE PORTFOLIO .pdfAHMED TALAAT ARCHITECTURE PORTFOLIO .pdf
AHMED TALAAT ARCHITECTURE PORTFOLIO .pdf
talaatahm
 
一比一原版(BU毕业证)波士顿大学毕业证如何办理
一比一原版(BU毕业证)波士顿大学毕业证如何办理一比一原版(BU毕业证)波士顿大学毕业证如何办理
一比一原版(BU毕业证)波士顿大学毕业证如何办理
peuce
 
Revolutionizing the Digital Landscape: Web Development Companies in India
Revolutionizing the Digital Landscape: Web Development Companies in IndiaRevolutionizing the Digital Landscape: Web Development Companies in India
Revolutionizing the Digital Landscape: Web Development Companies in India
amrsoftec1
 
Game Concept Presentation for Ukrainian Mythology Based Game With Designs
Game Concept Presentation for Ukrainian Mythology Based Game With DesignsGame Concept Presentation for Ukrainian Mythology Based Game With Designs
Game Concept Presentation for Ukrainian Mythology Based Game With Designs
184804
 
Virtual Tour Application Powerpoint for museum of edinburgh
Virtual Tour Application Powerpoint for museum of edinburghVirtual Tour Application Powerpoint for museum of edinburgh
Virtual Tour Application Powerpoint for museum of edinburgh
millarj46
 
定制美国西雅图城市大学毕业证学历证书原版一模一样
定制美国西雅图城市大学毕业证学历证书原版一模一样定制美国西雅图城市大学毕业证学历证书原版一模一样
定制美国西雅图城市大学毕业证学历证书原版一模一样
qo1as76n
 
EASY TUTORIAL OF HOW TO USE CAPCUT BY: FEBLESS HERNANE
EASY TUTORIAL OF HOW TO USE CAPCUT BY: FEBLESS HERNANEEASY TUTORIAL OF HOW TO USE CAPCUT BY: FEBLESS HERNANE
EASY TUTORIAL OF HOW TO USE CAPCUT BY: FEBLESS HERNANE
Febless Hernane
 
Design Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinkingDesign Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinking
cy0krjxt
 
一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理
一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理
一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理
jyz59f4j
 
Top Interior Designers in Bangalore.pdf1
Top Interior Designers in Bangalore.pdf1Top Interior Designers in Bangalore.pdf1
Top Interior Designers in Bangalore.pdf1
Decomart Studio
 
Divertidamente SLIDE.pptxufururururuhrurid8dj
Divertidamente SLIDE.pptxufururururuhrurid8djDivertidamente SLIDE.pptxufururururuhrurid8dj
Divertidamente SLIDE.pptxufururururuhrurid8dj
lunaemel03
 
一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理
一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理
一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理
asuzyq
 

Recently uploaded (20)

一比一原版(毕业证)早稻田大学毕业证成绩单如何办理
一比一原版(毕业证)早稻田大学毕业证成绩单如何办理一比一原版(毕业证)早稻田大学毕业证成绩单如何办理
一比一原版(毕业证)早稻田大学毕业证成绩单如何办理
 
一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理
一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理
一比一原版(NCL毕业证书)纽卡斯尔大学毕业证成绩单如何办理
 
一比一原版(毕业证)长崎大学毕业证成绩单如何办理
一比一原版(毕业证)长崎大学毕业证成绩单如何办理一比一原版(毕业证)长崎大学毕业证成绩单如何办理
一比一原版(毕业证)长崎大学毕业证成绩单如何办理
 
哪里办理美国中央华盛顿大学毕业证双学位证书原版一模一样
哪里办理美国中央华盛顿大学毕业证双学位证书原版一模一样哪里办理美国中央华盛顿大学毕业证双学位证书原版一模一样
哪里办理美国中央华盛顿大学毕业证双学位证书原版一模一样
 
UNIT V ACTIONS AND COMMANDS, FORMS AND CONTROLS.pptx
UNIT V ACTIONS AND COMMANDS, FORMS AND CONTROLS.pptxUNIT V ACTIONS AND COMMANDS, FORMS AND CONTROLS.pptx
UNIT V ACTIONS AND COMMANDS, FORMS AND CONTROLS.pptx
 
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证成绩单如何办理
 
ARENA - Young adults in the workplace (Knight Moves).pdf
ARENA - Young adults in the workplace (Knight Moves).pdfARENA - Young adults in the workplace (Knight Moves).pdf
ARENA - Young adults in the workplace (Knight Moves).pdf
 
Branding de la empresa de Bolt- 2024.pdf
Branding de la empresa de Bolt- 2024.pdfBranding de la empresa de Bolt- 2024.pdf
Branding de la empresa de Bolt- 2024.pdf
 
AHMED TALAAT ARCHITECTURE PORTFOLIO .pdf
AHMED TALAAT ARCHITECTURE PORTFOLIO .pdfAHMED TALAAT ARCHITECTURE PORTFOLIO .pdf
AHMED TALAAT ARCHITECTURE PORTFOLIO .pdf
 
一比一原版(BU毕业证)波士顿大学毕业证如何办理
一比一原版(BU毕业证)波士顿大学毕业证如何办理一比一原版(BU毕业证)波士顿大学毕业证如何办理
一比一原版(BU毕业证)波士顿大学毕业证如何办理
 
Revolutionizing the Digital Landscape: Web Development Companies in India
Revolutionizing the Digital Landscape: Web Development Companies in IndiaRevolutionizing the Digital Landscape: Web Development Companies in India
Revolutionizing the Digital Landscape: Web Development Companies in India
 
Game Concept Presentation for Ukrainian Mythology Based Game With Designs
Game Concept Presentation for Ukrainian Mythology Based Game With DesignsGame Concept Presentation for Ukrainian Mythology Based Game With Designs
Game Concept Presentation for Ukrainian Mythology Based Game With Designs
 
Virtual Tour Application Powerpoint for museum of edinburgh
Virtual Tour Application Powerpoint for museum of edinburghVirtual Tour Application Powerpoint for museum of edinburgh
Virtual Tour Application Powerpoint for museum of edinburgh
 
定制美国西雅图城市大学毕业证学历证书原版一模一样
定制美国西雅图城市大学毕业证学历证书原版一模一样定制美国西雅图城市大学毕业证学历证书原版一模一样
定制美国西雅图城市大学毕业证学历证书原版一模一样
 
EASY TUTORIAL OF HOW TO USE CAPCUT BY: FEBLESS HERNANE
EASY TUTORIAL OF HOW TO USE CAPCUT BY: FEBLESS HERNANEEASY TUTORIAL OF HOW TO USE CAPCUT BY: FEBLESS HERNANE
EASY TUTORIAL OF HOW TO USE CAPCUT BY: FEBLESS HERNANE
 
Design Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinkingDesign Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinking
 
一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理
一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理
一比一原版(LSE毕业证书)伦敦政治经济学院毕业证成绩单如何办理
 
Top Interior Designers in Bangalore.pdf1
Top Interior Designers in Bangalore.pdf1Top Interior Designers in Bangalore.pdf1
Top Interior Designers in Bangalore.pdf1
 
Divertidamente SLIDE.pptxufururururuhrurid8dj
Divertidamente SLIDE.pptxufururururuhrurid8djDivertidamente SLIDE.pptxufururururuhrurid8dj
Divertidamente SLIDE.pptxufururururuhrurid8dj
 
一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理
一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理
一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理
 

Creative Web 2 - CSS

  • 2. Linking to files can be done using
 a relativ path or and absolute path
  • 3. An absolute path is…
 a path which starts from the domain
  • 4. Examples of absolute paths! " http://domain.com/img/image.png" " btk-fh.de/css/style.css
  • 5. A relative path is…
 a path relative from the current file
  • 7. Linking from…" index.html to base.css in folder css
  • 9. Linking from…" index.html to img.png in folder imgs
  • 11. CSS
  • 12. Cascading Style Sheets are…" a language to define the style of HTML elements
  • 13. Advantages of css…
 separating design (css) from logic ! and structure (html). This makes ! the design easily reusable and ! maintainable."
  • 14. Linking external stylesheets! " <link rel="stylesheet" href="./libs/css/base.css" type="text/css" media="screen" charset="utf-8" />" " href is the relative or absolute path to the file." " media is the media the stylesheet is used for, " mainly screen and print."
  • 15. In a css file you define a css rule! " selector{! ! attribute: value;! }
  • 16. A selector tells css which element to apply the styles to.
  • 17. #unique ID-selectors start with a # and select the element with the id unique." " e.g. <div id=“unique”>…" " IDs can only be used once per html-page." " IDs consist of letters A-Z, numbers and underscore _ NO spaces, or other special characters. ID Selector
  • 18. .reuse class-selectors start with a . and select all elements with the class reuse." " e.g. <div class=“reuse”>…" " Classes can be used multiple times per html- page." " Classes consist of letters A-Z, numbers and minus - NO spaces, or other special characters Class Selector
  • 19. div element-selectors name the tag name and select all elements of the type div." " e.g. <div>…" " Element-selectors should be used with caution because they are not very specific. Element Selector
  • 21. When multiple css rules apply to an element and change the same property e.g. color the weight of the selectors defines which one will win.
  • 22. div{! ! color: red;! }! " .reuse{! ! color: blue;! }! " #unique{! ! color: purple;! } <div id=“unique” class=“reuse”>Text</div>" A class has more weight than an element-selector An id has more weight than a class-selector
  • 23. .font-red{! ! color: red;! }! " .reuse{! ! color: blue;! } <div class=“reuse font-red”>Text</div>" Both class-selector have the same weight, the last selector in the css file wins.
  • 24. .font-red.reuse{! ! color: red;! }! " .reuse{! ! color: blue;! } <div class=“reuse font-red”>Text</div>" Two class-selector have more weight, than one selector, so two classes win.
  • 25. CSS Selectors are read from ! right to left
  • 26. Find all li-elements
 Find all of those li-elements inside an element with a class reuse
 Find all of those li-elements inside an element with a class reuse which are inside the element with the id unique #unique .reuse li{! ! color: red;! }!
  • 27. Optimize css by being specific on the right of selector." " You could add a class .navi to those li- elements and change the css to .navi{! ! color: red;! }!
  • 29. Linking a javascript files! " <script type="text/javascript" src=“./libs/js/ javascript.js“></script>" " src is the relative or absolute path to the file." " Javascript files should always be linked just " before the closing tag of the body </body>
  • 30. Javascript
 Inside the js file you can write javascript without " declaring any head, etc. e.g." " alert(‘treeeees!’);" " This is a function and will create a popup with " the text treeeees! Which tells you that you " linked the file correctly.
  • 32. Navigations are build from lists
  • 33. Typically a navigation is a list of links <ul>! ! <li><a href=“index.html”>home</a></li>! ! ! <li><a href=“about.html”>about</a>! ! ! <ul class=“sub-menu”>! ! ! ! <li><a href=“me.html”>me/a></li>! ! ! ! <li><a href=“cv.html”>CV</a></li>! ! </li>! </ul>
  • 34. Navigations are build from lists
  • 35. Typically a navigation is a list of links <ul>! ! <li><a href=“index.html”>home</a></li>! ! ! <li><a href=“about.html”>about</a>! ! ! <ul class=“sub-menu”>! ! ! ! <li><a href=“me.html”>me/a></li>! ! ! ! <li><a href=“cv.html”>CV</a></li>! ! </li>! </ul>
  • 36. Assignments 1. Write 3 html pages with a navi <ul> linking them
 together." • Use the same stylesheet for all three files" • Add content and style it using css" • try at lest 5 css3 properties like gradient, 
 border-radius, transform, etc." • try to reuse css styles by using multiple classes 
 per element when it makes sense
  • 37. Assignments 2. Create and link a javascript file with the alert inside," so that you see the alert message when you open 
 the html file in your browser" " 3. Read this article to get an idea what JSON is 
 http://de.wikipedia.org/wiki/JavaScript_Object_Notation" " 4. If you know JS already read up on handlebars.js