The below two divs appear one next to other, the content of which are populated dynamically and the data is very long in both the divs.
My question is that how to add some space between the two divs?
<div name="qt" id="qt" style='width:50%;float:left;display:inline;overflow:auto;height:500px;border:1px solid #ccc;'> </div>
<div id="data" name="data" style='overflow:auto;width:35%;height:500px;margin-left:0px;border:1px solid #ccc;'></div>
a (the fixed one) to the top of the page, add top: 0; and if you want it to stay on top of the rest of the content, include z-index: 2; . In order to add spacing between div.
To add space between two elements on the same line with React, we can use flexbox. We set the style prop of the outer div to { display: "flex", justifyContent: "space-between" } to make the div have a flexbox layout.
you can add on css #qt {margin-right:10px;}
you can change the number of pixels you wish.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With