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/blocks/justify-self-auto-margins-2.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
<meta name="assert"
content="auto margins are calculated correctly when justify-self is specified but should have no effect" />
<style>
#reference-overlapped-red {
position: absolute;
background-color: red;
width: 100px;
height: 100px;
z-index: -1;
}
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.
</p>
<div id=reference-overlapped-red></div>
<div style="width: 100px;">
<div
style="height:100px; margin: auto; justify-self: right; background: green;">
<div style="width: 50px;"></div>
</div>
</div>