<div> is a block-level element. This means that its content automatically starts a new line.
You could use CSS to convert block-level elements to inline elements.
selector{display: inline-block;}
My test code for your reference:
<div id="test1" className={`${styles.test} ${styles.test1}`}>
<div >{"item.DocumentSymbol"}</div>
<div >{"item.DateOfDocument"}</div>
<div >{"item.DocumentType"}</div>
<button><a>Arabic</a></button>
</div>
<div id="test2" className={`${styles.test} ${styles.test2}`}>
<div >{"item.DocumentSymbol"}</div>
<div >{"item.DateOfDocument"}</div>
<div >{"item.DocumentType"}</div>
<button><a>Chinese</a></button>
</div>
<div id="test3" className={`${styles.test} ${styles.test3}`}>
<div >{"item.DocumentSymbol"}</div>
<div >{"item.DateOfDocument"}</div>
<div >{"item.DocumentType"}</div>
<button><a>French</a></button>
CSS:
.test{
display: inline-block;
}
.test1{
width:100px;
height:100px;
background-color: aqua;
}
.test2{
width:100px;
height:100px;
background-color:brown;
}
.test3{
width:100px;
height:100px;
background-color: chartreuse;
}
I hardcoded the elements to do the test directly.
Test result:
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.