- Notifications
You must be signed in to change notification settings - Fork 3.3k
/
Copy pathcalc-max-width-block-1.html
25 lines (22 loc) · 927 Bytes
/
calc-max-width-block-1.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
<!DOCTYPE HTML>
<html>
<head>
<title>CSS Test: max-width: calc() on blocks</title>
<linkrel="author" title="L. David Baron" href="https://dbaron.org/">
<linkrel="help" href="http://www.w3.org/TR/css3-values/#calc-notation">
<linkrel="match" href="calc-width-block-1-ref.html">
<styletype="text/css">
body { width:500px }
p { background: green; color: white; margin:1px0; font-size:10px; width:1000px; }
</style>
</head>
<body>
<pstyle="max-width: calc(50% - 3px)">50% - 3px</p>
<pstyle="max-width: calc(25% - 3px + 25%)">25% - 3px + 25%</p>
<pstyle="max-width: calc(25% - 3px + 12.5% * 2)">25% - 3px + 12.5% * 2</p>
<pstyle="max-width: calc(25% - 3px + 12.5%*2)">25% - 3px + 12.5%*2</p>
<pstyle="max-width: calc(25% - 3px + 2*12.5%)">25% - 3px + 2*12.5%</p>
<pstyle="max-width: calc(25% - 3px + 2 * 12.5%)">25% - 3px + 2 * 12.5%</p>
<pstyle="max-width: calc(30% + 20%)">30% + 20%</p>
</body>
</html>