<div>
<p>width: 50%; <br> height: 50%;</p>
</div>
<div>
<p>width: 25%; <br> height: 25%;</p>
</div>
@import url(https://fonts.googleapis.com/css2?family=Architects+Daughter&display=swap);
:root {
--pink: #E726B5;
--yellow: #FFE699;
--cream: #FBE5D6;
--green: #70AD47;
--red: #FF0000;
--text-shadow: 0.3px 0.3px #000000e0;
}
* {
margin: 0;
text-shadow: var(--text-shadow);
font-size: 20px;
font-family: Arial, Helvetica, sans-serif;
font-family: 'Architects Daughter';
}
body {
height: 100vh;
background-color: var(--yellow);
}
div {
display: grid;
background-color: var(--cream);
border: 3px dashed var(--pink);
margin: 10px;
}
p {
place-self: center;
}
div:nth-child(1) {
width: 50%;
height: 50%;
}
div:nth-child(2) {
width: 25%;
height: 25%;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.