Pengiun Step 12 (Margin and Margin-Top)

Hi All,
I’m not sure exactly where the mix-up is happening here?
Is there some ordering or syntax error here?

Thank you :slight_smile:

‘’’
body {
background: linear-gradient(45deg, rgb(118, 201, 255), rgb(247, 255, 222));
margin: 0;
padding: 0;
width: 100%;
height: 100vh;
overflow: clip;
}

.penguin {
width: 300px;
height: 300px;
margin-top: 75px;
margin: auto

}
‘’’

The margin-top property sets only the top margin but the margin property sets all four margins (top, right, bottom, left). Since you put margin after margin-top then all four margin properties are being set to auto and it is wiping out the previous margin-top property.

1 Like

Gotcha - I had a feeling it was something with the ordering
Thanks Bruce!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.