html - Can't move my table in div (container) -
i've tried move table, couldn't that. want move table inside div. can move table left/right. want table free. mistake? missed? maybe did styling wrong? please me solve problem.
here code:
/*imports*/ @import url('https://fonts.googleapis.com/css?family=ubuntu'); body{ background-color: #21ff00; margin: 0; padding: 0; } .division1 td{ padding: 5px; border: 2px solid #000; color: #fff; } .division1{ width: 100%; height: 500px; margin: 0; padding: 0; background-color: #fff; } .division1 table{ width: 380px; height: 380px; border: 1px solid #000; margin: 35px 28px; border-collapse: collapse; text-align: center; background-color: #0f6bff; font-family: 'ubuntu', sans-serif; }
<!doctype html> <html> <head> <title>mirashraf</title> <link rel="stylesheet" href="style.css"> </head> <body> <div class="division1"> <table border="1"> <tr> <td><b>name</b></td> <td><b>price</b></td> </tr> <tr> <td>macbook</td> <td>$999.99</td> </tr> <tr> <td>iphone</td> <td>$499.99</td> </tr> <tr> <td>ipad pro</td> <td>$649.99</td> </tr> <tr> <td>apple watch</td> <td>$1199.99</td> </tr> </table> </div> </body> </html>
please, me.
thanks in behind.
kindly split margin 4 parameters below margin: toppx rightpx bottompx leftpx , below css move table center of screen
.division1 table { width: 380px; height: 380px; border: 1px solid #000; margin: 50px 28px 41px 40%; border-collapse: collapse; text-align: center; background-color: #0f6bff; font-family: 'ubuntu', sans-serif; }
Comments
Post a Comment