Learn CSS Transforms by Building a Penguin - Step 12

Tell us what’s happening:
Describe your issue in detail here.

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8" />
    <link rel="stylesheet" href="./styles.css" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />

    <div class="penguin"></div>
    <div class="ground"></div>
/* file: styles.css */
body {
  background: linear-gradient(45deg, rgb(118, 201, 255), rgb(247, 255, 222));
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;

/* User Editable Region */

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


/* User Editable Region */

.ground {
  width: 100vw;
  height: 400px;
  background: linear-gradient(90deg, rgb(88, 175, 236), rgb(182, 255, 255));
  z-index: 3;
  position: absolute;

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

Challenge: Learn CSS Transforms by Building a Penguin - Step 12

Link to the challenge:

It’s helpful if you can learn to describe the issues you’re facing, including any error messages which you might be seeing. It’s a vital skill in coding and also, the more you say, the more we can help.

Use the margin property to horizontally center the .penguin element, and set the margin-top to 75px .

You can centre an element by setting the margin property to auto.
Below this you can then set other specific margins as required.

The instructions for this step say to set the margin top to 75 px. This can be done using the short method.

Not the answer, only guidance.
body {
color: purple;
width: 100%
border: 20px auto auto auto.
background-color: white;

The border is in short form. You can do the same with the margin.

Keep up the great progress!

Hopefully this helps you.

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