Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-align/abspos/align-items-static-position-001.tentative.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>Align-items only applies to OOF elements of block elements when statically positioned if it would apply if not OOF.</title>
<link rel="author" title="Alison Maher" href="mailto:almaher@microsoft.com">
<link rel="match" href="align-items-static-position-001-ref.tentative.html">
<style>
.block {
display: block;
width: 75%;
height: 75%;
border: 5px dotted blue;
align-items: center;
justify-items: center;
}
.container {
border: 1px solid;
position: relative;
width: 100px;
height: 100px;
display: inline-block;
margin-left: 50px;
margin-bottom: 50px;
}
.abs {
width: 50px;
height: 50px;
position: absolute;
background: purple;
}
</style>
<div class="container"><div class="block">
<div class="abs"></div>
</div></div>