Source code
Revision control
Copy as Markdown
Other Tools
<!DOCTYPE HTML>
<title> Ensure top doesn't take effect if margin isn't auto </title>
<style>
div {
inset: 0;
background-color: black;
margin: auto;
margin-bottom: 10px;
position: absolute;
block-size: 200px;
inline-size: 100px;
border: 5px solid red;
}
</style>
<div></div>