I'd like to make these occupy whole screen horizontally as squares and fit into it. At the moment they fit, because they are inline-blocks, but on certain screen sizes(or if you zoom out a bit) they will leave a <250px space to the right.
I could give them, for instance, width:25%;
, but how can I make them be squares? How to set the height to be equal to the dynamic width?
.note {
display: inline-block;
/*
#F3F389-galben
#96C0FF albastru
#94F1B6 verde
rosu#f40042
*/
background-color: #f40042;
width: 250px;
height: 250px;
margin-left: 25px;
margin-top: 25px;
padding: 0;
}
textarea {
width: 80%;
height: 60%;
display: block;
margin-top: 15px;
margin-left: auto;
margin-right: auto;
resize: none;
background: rgba(0, 0, 0, 0.13);
border: none;
padding: 5px;
font-family: 'Rancho', Helvetica, sans-serif;
font-size: 15px;
}
<div class="note">
<textarea placeholder="Your note's text here"></textarea>
</div>
<div class="note">
<textarea placeholder="Your note's text here"></textarea>
</div>
<div class="note">
<textarea placeholder="Your note's text here"></textarea>
</div>
<div class="note">
<textarea placeholder="Your note's text here"></textarea>
</div>
<div class="note">
<textarea placeholder="Your note's text here"></textarea>
</div>
<div class="note">
<textarea placeholder="Your note's text here"></textarea>
</div>
<div class="note">
<textarea placeholder="Your note's text here"></textarea>
</div>
<div class="note">
<textarea placeholder="Your note's text here"></textarea>
</div>
<div class="note">
<textarea placeholder="Your note's text here"></textarea>
</div>
<div class="note">
<textarea placeholder="Your note's text here"></textarea>
</div>
<div class="note">
<textarea placeholder="Your note's text here"></textarea>
</div>
<div class="note">
<textarea placeholder="Your note's text here"></textarea>
</div>