57
Cap 10 div and span

Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

Cap 10

div and span

Page 2: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

Div

Page 3: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

Div

Page 4: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

How we can divide a page into logical section

Page 5: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

Identify your logical sections

Page 6: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

Using <div>s to mark sections

Page 7: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

Labelling the <div>s

Page 8: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200
Page 9: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

Adding some style

Page 10: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

Exposing even more structure

Page 11: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

Adding structure on structure

Page 12: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

Div in the Elixir

Page 13: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

Taking the <div> for the test drive

Page 14: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200
Page 15: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

Adding a border

Page 16: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

An over-the-border test drive

Page 17: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

Adding some real style to elixir section

Page 18: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

Working on Elixir width

Page 19: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

Test driving the width

Page 20: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

The width property specifies the width for the content area only

Page 21: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200
Page 22: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200
Page 23: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

Adding the basic style to elixirs

Page 24: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

Test driving the new style

Page 25: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200
Page 26: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200
Page 27: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200
Page 28: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200
Page 29: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

What we need is the way to select descendants

Page 30: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

What we need is the way to select descendants

Page 31: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200
Page 32: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

Changing the color of elixirs headers

Page 33: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

A quick test drive

Page 34: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

Fixing line height

Page 35: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

It’s time to take little shortcut

Page 36: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

Shortcut…

Page 37: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

Shortcut…

Page 38: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200
Page 39: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200
Page 40: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200
Page 41: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

Adding <span>s in three easy way

Page 42: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

Step one and two: add the <span>s

Page 43: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

Step three: style the <span>s

Page 44: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200
Page 45: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

<a> and style

Page 46: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

<a> style

Page 47: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

Putting pseudo-classes to work

Page 48: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

Cascade style sheet

Page 49: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200
Page 50: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

The cascade

Page 51: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

What’s my specifity game

Page 52: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

Step one

Page 53: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

Step two

Page 54: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

Step three

Page 55: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

Step four

Page 56: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

Step five

Page 57: Cap 10 - Dipartimento di Matematica e Informatica · par pefl So row you understand widths, what's the total width of the elixirs box? To staff with. we know the content area is 200

Homework