0
I created a div containing several buttons, and I set in two of these buttons (those of the second row of buttons) the attribute align = "center"
, html itself. But it was the same thing as nothing, they keep appearing aligned to the left of the div. What can be ?
<!DOCTYPE html>
<html>
<head><title> Banco Online </title>
<link rel="StyleSheet"
href="EstiloBotao.css"
type="text/css" />
<link rel="StyleSheet"
href="EstiloMenu.css"
type="text/css" />
</head>
<body>
<div class="menu" id="menu1">
<button class="botao" onClick="mudaMenu('menu1', 'menu2')">Iniciar</button>
</div>
<div class="menu" id="menu2" style="display:none">
<button class="botao"> Saldo </button>
<button class="botao" > Extratos </button>
<button class="botao" > Saques </button>
<br> <!-- ESSES DOIS BOTÕES ABAIXO NÃO FICAM CENTRALIZADOS NA
DIV-->
<br>
<button class="botao" align="center" > Depósitos </button>
<button class="botao" align="center"> Transferências </button>
</div>
...... resto do código
The css of the menu div:
body, html {
padding:0;
margin:0;
width:100%;
height:100%;
position:relative;
}
.menu{
position:absolute;
top:50%;
left:50%;
transform:translate(-50%,-50%);
}
The style css of the button:
botao{
background:#6E6E6E;
color:gold;
font-size:22px;
font-family:Verdana;
font-weight:bold;
height:100px; width:200px;
border-color:#D8D8D8;
border-radius:20px;
border-width:6px;
}