# Where am I going wrong, i am new to coding

**URL:** <https://forum.freecodecamp.org/t/where-am-i-going-wrong-i-am-new-to-coding/577889>\
**Category:** Curriculum Help\
**Tags:** css, html\
**Created:** [December 14, 2022, 4:51am UTC](https://forum.freecodecamp.org/t/where-am-i-going-wrong-i-am-new-to-coding/577889 "2022-12-14T04:51:35Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Codingcoder\_95](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/codingcoder_95/32/296707_2.png) [@Codingcoder\_95](https://forum.freecodecamp.org/u/Codingcoder_95)\
**Post date:** [December 14, 2022, 4:51am UTC](https://forum.freecodecamp.org/t/where-am-i-going-wrong-i-am-new-to-coding/577889/1 "2022-12-14T04:51:35Z")

</div>

I am trying to make a round face with eyes looking on the right side.  
This is my HTML and CSS, can anyone help me figure out what is it that is wrong here in my code.

 ![Help](https://global.discourse-cdn.com/freecodecamp/original/4X/6/1/8/6187b8f07a850af1a89e13d8a0f3075a6a0e6763.png)

---

<div class="post-metadata">

**Author:** ![Codingcoder\_95](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/codingcoder_95/32/296707_2.png) [@Codingcoder\_95](https://forum.freecodecamp.org/u/Codingcoder_95)\
**Post date:** [December 14, 2022, 4:56am UTC](https://forum.freecodecamp.org/t/where-am-i-going-wrong-i-am-new-to-coding/577889/4 "2022-12-14T04:56:10Z")

</div>

```auto
<!DOCTYPE html>
<html lang="en">

<head>
    <link rel="stylesheet" href="src/style.css">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>BOB Excersice</title>
</head>

<body>
    <div class="face">
        <div class="eye-container">
            <div class="eye"></div>
            <div class="pupil"></div>
            <div>
                <div class="eye"></div>
                <div class="pupil"></div>
            </div>
        </div>
    </div>
</body>

</html>

```

This is the HTML

---

<div class="post-metadata">

**Author:** ![Codingcoder\_95](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/codingcoder_95/32/296707_2.png) [@Codingcoder\_95](https://forum.freecodecamp.org/u/Codingcoder_95)\
**Post date:** [December 14, 2022, 4:58am UTC](https://forum.freecodecamp.org/t/where-am-i-going-wrong-i-am-new-to-coding/577889/5 "2022-12-14T04:58:09Z")

</div>

```auto
body{
    background-color: lightskyblue;
}

.face{
    background-color: lightcoral;
    height: 250px;
    width: 250px;
    border-radius:150px;
    margin-left: 150px;
    margin-top: 150px;
}

.eye-container{
    display: flex;
    padding-left: 40px;
    padding-top: 40px;

}

.eye{
    height: 60px;
    width: 60px;
    background-color: white;
    border-radius: 50px;
    margin:20px;
}

.pupil{
    height: 10px;
    width: 10px;
    background-color: black;
    margin: 10px 0px 10px 10px;
}

```

This is CSS  
Also, the size of the white ‘eyes’ are shifting when I’m trying to put ‘pupil’ CSS properties.

---

<div class="post-metadata">

**Author:** ![camperextraordinaire](https://avatars.discourse-cdn.com/v4/letter/c/5f9b8f/32.png) [@camperextraordinaire](https://forum.freecodecamp.org/u/camperextraordinaire)\
**Post date:** [December 14, 2022, 5:06am UTC](https://forum.freecodecamp.org/t/where-am-i-going-wrong-i-am-new-to-coding/577889/6 "2022-12-14T05:06:20Z")

</div>

I first would suggest you nest two `eye` divs within the `eye-container` div. Next, I would nest a `pupil` div in each of the `eye` divs.

Doing the above will have the pupils pointing to the upper left. If you can get this far, then see if you can play with the position of the pupils by changing the `eye` class.

Hint to accomplish the second part:

Set the `eye`’s `display` property to `flex` and use applicable `justify-content` and `align-items` property values for it. You will also need to remove the left padding from the `eye-container` div to center the eyes.

---

<div class="post-metadata">

**Author:** ![Codingcoder\_95](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/codingcoder_95/32/296707_2.png) [@Codingcoder\_95](https://forum.freecodecamp.org/u/Codingcoder_95)\
**Post date:** [December 14, 2022, 5:24am UTC](https://forum.freecodecamp.org/t/where-am-i-going-wrong-i-am-new-to-coding/577889/7 "2022-12-14T05:24:04Z")

</div>

I gave it a try and here is the result.

```auto
<!DOCTYPE html>
<html lang="en">

<head>
    <link rel="stylesheet" href="src/style.css">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>BOB Excersice</title>
</head>

<body>
    <div class="face">
        <div class="eye-container">
            <div class="eye">
                <div class="pupil"></div>
            </div>
            <div class="eye">
                <div class="pupil"></div>
            </div>
            <div>
            </div>
        </div>
    </div>
</body>

</html>

```

```auto
body{
    background-color: lightskyblue;
}

.face{
    background-color: lightcoral;
    height: 250px;
    width: 250px;
    border-radius:150px;
    margin-left: 150px;
    margin-top: 150px;
}

.eye-container{
    display: flex;
    justify-content: center;
    /* padding-left: 20px; */
    padding-top: 40px;

}

.eye{
    height: 60px;
    width: 60px;
    background-color: white;
    border-radius: 50px;
    margin:20px;
    display: flex;
    justify-content: center;
}

.pupil{
    height: 20px;
    width: 20px;
    background-color: black;
    border-radius: 20px;
    margin: 20px 0px 0px 40px;
}

```

---

<div class="post-metadata">

**Author:** ![Codingcoder\_95](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/codingcoder_95/32/296707_2.png) [@Codingcoder\_95](https://forum.freecodecamp.org/u/Codingcoder_95)\
**Post date:** [December 14, 2022, 5:30am UTC](https://forum.freecodecamp.org/t/where-am-i-going-wrong-i-am-new-to-coding/577889/9 "2022-12-14T05:30:12Z")

</div>

```auto
<!DOCTYPE html>
<html lang="en">

<head>
    <link rel="stylesheet" href="src/style.css">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>BOB Excersice</title>
</head>

<body>
    <div class="face">
        <div class="eye-container">
            <div class="eye">
                <div class="pupil"></div>
            </div>
            <div class="eye">
                <div class="pupil"></div>
            </div>
        </div>
    </div>
</body>

</html>

```

---

<div class="post-metadata">

**Author:** ![Codingcoder\_95](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/codingcoder_95/32/296707_2.png) [@Codingcoder\_95](https://forum.freecodecamp.org/u/Codingcoder_95)\
**Post date:** [December 14, 2022, 5:37am UTC](https://forum.freecodecamp.org/t/where-am-i-going-wrong-i-am-new-to-coding/577889/10 "2022-12-14T05:37:48Z")

</div>

Thank You, Randell  
This is my first time in the self-taught programmers community looking for the help and the way you helped me made me think differently, I really appreciate it.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [June 14, 2023, 5:38pm UTC](https://forum.freecodecamp.org/t/where-am-i-going-wrong-i-am-new-to-coding/577889/11 "2023-06-14T17:38:05Z")

</div>

Closed on June 14, 2023, 5:38pm UTC

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