html - Unable to align div and a button in CSS -
i have div , button. button should placed in same line div. unable that. button displayed in next line. how can that? here code:
<?php echo " <div class='data'> <p id='thedata'>name</p> </div> "; ?> <button class="copybtn" onclick="copytoclipboard('thedata')">copy data</button> these css code given data element
.data{ font-size:1.2em; color:#000000; width:300px; height:50px; border:2px solid #ef6c00; padding-bottom:10px; }
<div class='data' style="display: inline-block;"> <p id='thedata'>name</p> </div> <button class="copybtn" onclick="copytoclipboard('thedata')">copy data</button>
Comments
Post a Comment