“Tombol Pusat HTML” Kode Jawaban

Tombol Pusat HTML

button{
    /*Change the width as much as you like, but make sure 
    margin-left and margin-right + width = 100%*/
    width:50%;
    margin-left:25%;
    margin-right:25%;
}
Dr. Hippo

cara menyelaraskan tombol di tengah

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
  <style>
    /*margin-left means to set how much side you want the object to be*/
    /*Top means the top in an object*/
    /*You can use pixels as px or centimetre as cm instead od percentage
    to set locationj you wanna set*/
    .location{
      margin-left:50%;
      margin-top:50%;
      border:1px solid black;
    }
  </style>
</head>
<body>
    <button class="location">Button</button>
</body>
</html>
VScoder

Jawaban yang mirip dengan “Tombol Pusat HTML”

Pertanyaan yang mirip dengan “Tombol Pusat HTML”

Lebih banyak jawaban terkait untuk “Tombol Pusat HTML” di HTML

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya