mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:38:12 +00:00

Specifically, we now handle cases where all three of `left`, `width` and `right` are non-`auto`.
31 lines
No EOL
600 B
HTML
31 lines
No EOL
600 B
HTML
<!DOCTYPE html><style>
|
|
* {
|
|
border: 1px solid black;
|
|
}
|
|
div {
|
|
height: 100px;
|
|
width: 100px;
|
|
position: absolute;
|
|
height: 100px;
|
|
}
|
|
#foo {
|
|
margin: auto;
|
|
left: 0px;
|
|
right: 0px;
|
|
top: 0px;
|
|
}
|
|
#bar {
|
|
margin-left: auto;
|
|
margin-right: 0px;
|
|
left: 0px;
|
|
right: 0px;
|
|
top: 100px;
|
|
}
|
|
#baz {
|
|
margin-left: 0px;
|
|
margin-right: auto;
|
|
left: 0px;
|
|
right: 0px;
|
|
top: 200px;
|
|
}
|
|
</style><div id=foo></div><div id=bar></div><div id=baz></div> |