My reindeer code seems to be a bit off-center. Even though I followed a tutorial, my reindeer is not aligning properly as shown in the tutorial.
Here is all the CSS code for the reindeer:
.reindeer {
height: 510px;
width: 350px;
position: absolute;
margin: auto;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
.face {
background-color: #A98467;
height: 150px;
width: 100px;
border-radius: 70px;
position: relative;
top: 200px;
left: 320px;
}
.antler1, .antler2 {
height: 25px;
width: 96px;
border-right: 10px solid #6C584C;
border-top: 10px solid #6C584C;
border-radius: 0 20px 0 0;
z-index: -2;
position: relative;
bottom: 15px;
right: 65px;
}
.a1, .a2, .a3 {
background-color: #6C584C;
height: 55px;
width: 10px;
border-radius: 10px;
position: relative;
}
.a1 {
bottom: 55px;
}
.a2 {
bottom: 110px;
left: 30px;
}
.a3 {
bottom: 165px;
left: 60px;
}
.antler2 {
left: 65px;
bottom: 40px;
transform: rotateY(180deg);
}
.eye1, .eye2{
background-color: #333333;
height: 20px;
width: 20px;
border-radius: 50%;
position: relative;
}
.eye1 {
bottom: 5px;
left: 15px
}
.eye2 {
bottom: 25px;
left: 60px;
}
.eyeball {
background-color: white;
height: 8px;
width: 8px;
border-radius: 50%;
position: relative;
top: 5px;
left: 5px;
}
.ear1, .ear2 {
background-color: #95755E;
height: 30px;
width: 60px;
border-radius: 0 0 30px 30px;
position: relative;
z-index: -1;
}
.ear1 {
bottom: 75px;
right: 23px;
transform: rotate(-25deg);
}
.ear2 {
bottom: 105px;
left: 60px;
transform: rotate(25deg);
}
.nose {
background-color: #EE0000;
height: 22px;
width: 35px;
border-radius: 50%;
position: relative;
bottom: 60px;
left: 30px;
}
.nose2 {
background-color: #F8453B;
height: 9px;
width: 15px;
border-radius: 50%;
position: relative;
bottom: 78px;
left: 43px;
}
.leg1, .leg2 {
background-color: #6C584C;
height: 100px;
width: 20px;
position: relative;
border-radius: 0 0 8px 8px;
z-index: -2;
}
.leg1 {
left: 340px;
top: 300px;
}
.leg2 {
left: 380px;
top: 200px;
}
.body {
background-color: #95755E;
height: 200px;
width: 130px;
border-radius: 100px;
position: relative;
bottom: 60px;
left: 305px;
z-index: -1;
}
I am struggling with aligning my reindeer perfectly centered. I've tried changing from relative to absolute positioning, but it doesn't seem to solve the issue. Can anyone offer assistance? This project is for school, and I need to complete it quickly.
https://i.stack.imgur.com/AqBWD.jpg https://i.stack.imgur.com/Ro8Z2.png
<div class="reindeer">
<div class="face">
<div class="antler1">
<div class="a1"></div>
<div class="a2"></div>
<div class="a3"></div>
</div>
<div class="antler2">
<div class="a1"></div>
<div class="a2"></div>
<div class="a3"></div>
</div>
<div class="eye1">
<div class="eyeball"></div>
</div>
<div class="eye2">
<div class="eyeball"></div>
</div>
<div class="ear1"></div>
<div class="ear2"></div>
<div class="nose"></div>
<div class="nose2"></div>
</div>
<div class="leg1"></div>
<div class="leg2"></div>
<div class="body"></div>
</div>
I discovered something that helped center the reindeer more, but I'm still facing alignment issues. I forgot to include the
height: 510px;
width: 350px;
position: absolute;
margin: auto;
top: 0;
bottom: 0;
left: 0;
right: 0;
in the .raindeer. Now it's closer to the center, but I'm unsure how to further improve its alignment.