-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Expand file tree
/
Copy pathpercentage-widths-001.html
More file actions
47 lines (40 loc) · 996 Bytes
/
percentage-widths-001.html
File metadata and controls
47 lines (40 loc) · 996 Bytes
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
40
41
42
43
44
45
<!DOCTYPE html>
<title>CSS Test: Absolutely positioned children of flexboxes</title>
<link rel="author" title="Google Inc." href="http://www.google.com/">
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#definite-sizes">
<link rel="match" href="percentage-widths-001-ref.html">
<meta name="assert" content="Checks that we correctly size percentage-sized
children of absolute-positioned flex boxes">
<style>
body {
position: relative;
width: 600px;
height: 800px;
}
#container {
background-color: red;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
display: flex;
flex-direction: row;
}
#top-bar {
background-color: green;
width: 20%;
}
#content {
background-color: blue;
flex-basis: 100%;
}
</style>
<div id="container">
<div id="top-bar">
Tests that percentage widths get resolved correctly when the flexbox is
</div>
<div id="content">
absolutely positioned without an explicit width. You should see no red.
</div>
</div>