It seems my browsers has a default margin set on the <body>
element and thus if some element E ( declared inside the body element ) has a margin of 10px, E will be removed from the edges of browser by distance = body_Margin + 10px.
a) Assuming we also have an element B, which is absolutely positioned:
#B
{
position:absolute;
width:150px;
top:128px;
right:0px;
margin:0px;
}
then I would expect that B would be removed from the right edge of a browser by a distance of 10px, but instead B ignores the default margin of a body element and thus its distance is 0px. Why is that?
b)
body
{
background-color: blue;
margin:70px;
}
Since body element has a margin of 70px, then due to margins being transparent ( and thus they don’t have the same background color as their element ), I would expect the edges of the browser window to have white color, but instead they have same color as the body element ( blue )?!