JSFiddle - React, Tailwind, and code Playground

by Diem Edixhoven

HTML

<div id="robot">
  <div id="head">
    <div class="eye" id="righteye"></div>
    <div class="eye" id="lefteye"></div>
    <div id="nose"></div>
    <div id="mouth"></div>

  </div>
  <div class="arm" id="rightarm"></div>
  <div id="body">
    <p id="message">
    </p>
  </div>
  <div class="arm" id="leftarm"></div>
</div>

CSS

body {
  font-family: "Comic Sans MS", cursive, sans-serif;
}

p {
  font-size: 2.5em;
}

.eye {
  background-color: Blue;
  width: 20%;
  height: 20%;
  border-radius: 50%;
}

.arm {
  background-color: #cacaca;
  position: absolute;
  top: 35%;
  width: 5%;
  height: 40%;
}

#head {
  width: 30%;
  height: 30%;
  border-radius: 15%;
  background-color: #cacaca;
  position: absolute;
  left: 33%;
  top: 5%;
}


#righteye {
  position: absolute;
  left: 20%;
  top: 20%;
}

#lefteye {
  background-color: purple;
  position: absolute;
  left: 60%;
  top: 20%;
}

#nose {
  position: absolute;
  left: 45%;
  top: 50%;
  width: 10%;
  height: 10%;
  background-color: Grey;
}

#mouth {
  position: absolute;
  width: 65%;
  height: 15%;
  left: 20%;
  top: 70%;
  background-color: red;
}

#body {
  position: absolute;
  left: 25%;
  top: 35%;
  width: 45%;
  height: 55%;
  background-color: Slateblue;
  text-align: center;
  padding-top: 30px;
}

#rightarm {
  background-color: #cacaca;
  position: absolute;
  left: 20%;
}

#leftarm {
  background-color: #cacaca;
  position: absolute;
  left: 70%;
}

JavaScript

var myMess = prompt("Wat moet er op dat t-shirt?!");
document . getElementById("message")
  .innerHTML = myMess;
  
document.getElementById("body").style.border = "2px black solid"