-
Notifications
You must be signed in to change notification settings - Fork 0
/
flex.html
40 lines (35 loc) · 884 Bytes
/
flex.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<!DOCTYPE html>
<!--
It took me about 10 minutes to work on this question. The solution is simple
The flex order is manipulated in the @media. column 2 is displayed third and
hence it occupies the last row!
I have learned how to use flex!
-->
<html lang="en">
<head>
<link rel="stylesheet" href="flex.css">
<title>Responsive Using Flex</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div class="header">
<h2>Header</h2>
</div>
<div class="menu">
<ul>
<li>Menu1</li>
<li>Menu2</li>
<li>Menu3</li>
</ul>
</div>
<div class="row">
<div class="column1" style="background-color:#aaa;">Column1</div>
<div class="column2" style="background-color:#bbb;">Column2</div>
<div class="column3" style="background-color:#ccc;">Column3</div>
</div>
<div class="footer">
<p>Footer</p>
</div>
</body>
</html>