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

Popular posts from this blog

How to understand 2 main() functions after using uftrace to profile the C++ program? -

c# - Update a combobox from a presenter (MVP) -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -