examples css html

29
Vidal i Barraquer SMX - M8 Silvia Guerrero Raul Solà Bartosz Prokott

Upload: raul-raul

Post on 22-May-2015

746 views

Category:

Technology


9 download

DESCRIPTION

Few examples of css Unos cuantos ejemplos de CSS

TRANSCRIPT

Page 1: Examples CSS HTML

Vidal i Barraquer

SMX - M8

Silvia Guerrero

Raul Solà

Bartosz Prokott

Page 2: Examples CSS HTML

Índex

❏Background

❏ Lists

❏ Text

❏ Tables

❏ Fonts

❏ Links

Page 3: Examples CSS HTML

Type background

• Background color

• Background image

• Background Image - Repeat Horizontally

or Vertically

Page 4: Examples CSS HTML

Background color

body {background-color:#b0c4de;}

Example

Property Value Selector

Page 5: Examples CSS HTML

Background image

body {background-image:url('paper.gif');}

Example

Property

Value Selector

Page 6: Examples CSS HTML

Background image - repeat x / y

body {background-image:url('prova.jpg');background-repeat:repeat-y;}

Property

Value Selector Property

Value

Example

Page 7: Examples CSS HTML

Type lists

● Unordered Lists

● Ordered Lists

● Description Lists

Page 8: Examples CSS HTML

Unordered lists

<ul>

<li>Coffee</li>

<li>Milk</li>

</ul>

• Coffee

• Milk

Example

Page 9: Examples CSS HTML

Ordered lists

<ol>

<li>Coffee</li>

<li>Milk</li>

</ol>

1. Coffee

2. Milk

Example

Page 10: Examples CSS HTML

Description lists

<dl>

<dt>Coffee</dt>

<dd>- black hot

drink</dd>

<dt>Milk</dt>

<dd>- white cold

drink</dd>

</dl>

Coffee

- black hot drink

Milk

-white cold drink

Example

Page 11: Examples CSS HTML

Type text

• Text Color

• Text Alignment

• Text Transform

Page 12: Examples CSS HTML

Text Color

body {color:#00ff00;}

Property

Value Selector

Example

Page 13: Examples CSS HTML

Text Alignment

h1{text-align:center;}

Property

Value Selector

Example

Page 14: Examples CSS HTML

Text Transform

p{text-transform:uppercase;}

Property

Value Selector

Example

Page 15: Examples CSS HTML

Type tables

• Table Borders

• Table Width and Height

• Table Text Alignment

• Table Styling

Page 16: Examples CSS HTML

Table Borders

table,th,td {border:1px solid black;}

Selector Property Value

Example

Page 17: Examples CSS HTML

Table Width and Height

table{width:100%;}

th{height:50px;}

Selector Property Value

Example

Selector Property Value

Page 18: Examples CSS HTML

Table Text Alignment

td{text-align:right;}

Example

Selector Property Value

Page 20: Examples CSS HTML

Type fonts

● Font family

● Font style

● Font size

Page 21: Examples CSS HTML

Font Family

p{font-family:"Times New Roman", Times, serif;}

Selector Property Value

Example

Page 22: Examples CSS HTML

Font Style

p.normal {font-style:normal;}

p.italic {font-style:italic;}

p.oblique {font-style:oblique;}

normal - normal text displays

italic - the text is shown in italics

oblique - the text is tilted

Selector Property Value

Example

Page 23: Examples CSS HTML

Font Size

h1 {font-size:40px;}

h2 {font-size:30px;}

p {font-size:14px;}

Selector Property Value

Example

Page 24: Examples CSS HTML

Type links

• Styling links

• Text Decoration

• Background color

Page 25: Examples CSS HTML

Styling links

a:link {color:#FF0000;}

a:visited {color:#00FF00;}

a:hover {color:#FF00FF;}

a:active {color:#0000FF;} a:link - a link without visiting

a:visited - a link that has been visited

a:hover - a link when the mouse is over

a:active - a link when clicked

Selector Property Value

Example

Page 26: Examples CSS HTML

Text Decoration

a:link {text-decoration:none;}

a:visited {text-decoration:none;}

a:hover {text-decoration:underline;}

a:active {text-decoration:underline;}

Selector Property Value

Example

Page 27: Examples CSS HTML

Background color

a:link {background-color:#B2FF99;}

a:visited {background-color:#FFFF85;}

a:hover {background-color:#FF704D;}

a:active {background-color:#FF704D;}

Selector Property Value

Example

Page 28: Examples CSS HTML

Bonus

Selector Property Value

*{ border: 1px dashed}

Example

Page 29: Examples CSS HTML

Website with examples

http://cssweb.esy.es/CSSm8/index.html

VISIT OUR WEBSITE