While I am familiar with the concept of using left:
and right:
positioning to place an element within its parent container, I came across a website recently where many elements had both properties set to 0.
For example:
div {
width: 200px;
height: 200px;
position: fixed;
top: 0;
left: 0;
right: 0;
}
This was observed in several instances of fixed
and relative
positioned <div>
s on the site. Can you really fix a <div>
so that it is positioned at zero for both left and right? If this is valid CSS, could someone please explain its purpose?
Thank you,
Emily