As part of my project, I am working on creating a number board where specific numbers need to merge into a single cell. Please see the picture for reference https://i.sstatic.net/99WJq.png
Below is the HTML code snippet that I have tried. I used margin for non-merge cells and border for merged cells, but unfortunately, the alignment of the cells got distorted. Can anyone suggest a different approach or provide any leads or runnable links that might be helpful?
<!DOCTYPE html>
<html>
<body>
<div class="parent">
<div class="child">14</div>
<div class="child">15</div>
<div class="child">16</div>
<div class="child">17</div>
<div class="child merged">18</div>
<div class="child merged">19</div>
<div class="child merged">20</div>
<div class="child">34</div>
<div class="child">35</div>
<div class="child">36</div>
<div class="child">37</div>
<div class="child">38</div>
<div class="child">39</div>
<div class="child">40</div>
</div>
</body>
</html>
Here is what I have attempted so far https://i.sstatic.net/e6OXk.png
.parent {
display: flex;
flex-wrap: wrap;
align-content: flex-start;
}
.child {
margin: 4px;
padding: 0;
height: 35px;
width: 35px;
background: #FFFFFF;
border: 1px solid #C0C0C0;
}
.merged{
margin: 0;
padding: 4px;
border-color: #1792E5;
background-color: #1792E5;
color: #FFFFFF;
}