```html TP CSS3

TP CSS3

Exercice 1

1.1 Sélecteurs

.main-nav a
a.active
article.featured
article p:first-of-type
li:nth-child(even)

1.2 Spécificité

p < .text < p.text < #main < #main .text p

Exercice 2

2.1 Box Model

.box {
 width:300px;
 padding:20px;
 border:5px;
}
Box

Exercice 3

3.1 Navbar

.navbar { display:flex; justify-content:space-between; }

3.2 Cartes

.cards { display:flex; gap:20px; }
.card { flex:1; display:flex; flex-direction:column; }
Carte 1Lire
Carte 2Lire

Exercice 4

4.1 Grid

grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
1
2

4.2 Layout

Header
Sidebar
Main

Exercice 5

5.1 Mobile First

@media(min-width:768px){ ... }
Main

Exercice 6

Exercice 7

Exercice 8

  1. #id
  2. 200px
  3. flex center
  4. 1fr
  5. min-width
```