Skip to content

Commit be2a19a

Browse files
committed
CSS min() & max()
1 parent 82c0746 commit be2a19a

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

More-CSS/css-min-max.html

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>CSS min() & max()</title>
7+
<style>
8+
body {
9+
background: gray;
10+
min-height: 100vh;
11+
display: grid;
12+
place-items: center;
13+
font-size: 1.125em;
14+
line-height: 1.6;
15+
}
16+
.content {
17+
background: whitesmoke;
18+
padding: 3em;
19+
20+
/* width: 70%;
21+
max-width: 600px; */
22+
width: min(600px, 70%);
23+
width: max(400px, 50%, 50vh);
24+
}
25+
</style>
26+
</head>
27+
<body>
28+
<div class="content">
29+
<h1 class="title">this world shall know pain</h1>
30+
<p>
31+
Lorem ipsum dolor sit amet consectetur adipisicing elit. Suscipit neque
32+
nobis voluptas nostrum adipisci porro minima quaerat cupiditate earum
33+
facere animi itaque totam numquam, at recusandae, quibusdam, possimus
34+
aspernatur quae!
35+
</p>
36+
</div>
37+
</body>
38+
</html>

0 commit comments

Comments
 (0)