- Joined
- Mar 20, 2020
- Messages
- 3
- Reaction score
- 0
Hi, please could someone help with my code. For some reason my css is not responding to certain classes for example I'm able to style my .pineapple class however my .eye, .mouth and .leftball are not working! Also when I add another class selector to my css it comes up white not yellow.
P.s I'm using code pen currently
Here is my code:
<div id="container">
<div class="pineapple"> </div>
<div class="leftball"> </div>
<div class="cball"> </div>
<div class="rightball"> </div>
<div class="eye"> </div>
<div class="eye"> </div>
<div class="mouth"> </div>
<div class="leftarm"> </div>
<div class="rightarm"> </div>
<div class="rightleg"> </div>
<div class="leftleg"> </div>
</div>
body{
background-color: pink
}
#container{
}
.pineapple{
width: 200px;
height: 280px;
background-color: yellow;
border-radius: 60%;
margin: auto;
margin-top: 160px;
border-top-left-radius: 50% 40%;
border-top-right-radius: 50% 40%;
border-bottom-left-radius: 50% 40%;
border-bottom-right-radius: 49% 40%;
}
.eye{
width: 10px;
height: 10px;
margin-top: 80px;
background-color: black;
border-radius: 30%;
float: left;
padding: 2px;
margin-left: 50px;
}
.mouth {
width: 30px;
height: 25px;
background: black;
position: absolute;
left:375px;
border-bottom-left-radius: 133px;
border-bottom-right-radius: 136px;
overflow: hidden;
margin: 0, auto;
margin-top: 125px;
margin-left: 78px;
}
.leftball{
position:absolute;
width:80px;
height:80px;
background-color: green;
margin:0 auto;
margin-top: -79.5px;
border-top-left-radius: 50%;
border-top-right-radius:50%;
border-bottom-left-radius: 50%;
border-bottom-right-radius:50%;
{
P.s I'm using code pen currently
Here is my code:
<div id="container">
<div class="pineapple"> </div>
<div class="leftball"> </div>
<div class="cball"> </div>
<div class="rightball"> </div>
<div class="eye"> </div>
<div class="eye"> </div>
<div class="mouth"> </div>
<div class="leftarm"> </div>
<div class="rightarm"> </div>
<div class="rightleg"> </div>
<div class="leftleg"> </div>
</div>
body{
background-color: pink
}
#container{
}
.pineapple{
width: 200px;
height: 280px;
background-color: yellow;
border-radius: 60%;
margin: auto;
margin-top: 160px;
border-top-left-radius: 50% 40%;
border-top-right-radius: 50% 40%;
border-bottom-left-radius: 50% 40%;
border-bottom-right-radius: 49% 40%;
}
.eye{
width: 10px;
height: 10px;
margin-top: 80px;
background-color: black;
border-radius: 30%;
float: left;
padding: 2px;
margin-left: 50px;
}
.mouth {
width: 30px;
height: 25px;
background: black;
position: absolute;
left:375px;
border-bottom-left-radius: 133px;
border-bottom-right-radius: 136px;
overflow: hidden;
margin: 0, auto;
margin-top: 125px;
margin-left: 78px;
}
.leftball{
position:absolute;
width:80px;
height:80px;
background-color: green;
margin:0 auto;
margin-top: -79.5px;
border-top-left-radius: 50%;
border-top-right-radius:50%;
border-bottom-left-radius: 50%;
border-bottom-right-radius:50%;
{