Align a button? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 3

Align a button?

For my code, I need the button to be aligned to the center, but I can't change its position. Does anyone know how to center the button?

6th Jun 2020, 6:30 PM
Nicole
9 Respostas
+ 4
You can do it by css too. Text-align: center;
6th Jun 2020, 6:42 PM
Samira
Samira - avatar
+ 2
Of course. Could you link your code please?
6th Jun 2020, 6:37 PM
JaScript
JaScript - avatar
+ 2
<center><button></button></center>
8th Jun 2020, 12:26 PM
KUSHAL AGARWAL
KUSHAL AGARWAL - avatar
+ 1
Ja Play It's okay, thanks for your concern!
6th Jun 2020, 6:43 PM
Nicole
0
Change display:block Set :width Margin:auto Try this
7th Jun 2020, 8:47 AM
Shivam Rawal
0
<center><button>button</button></center>
26th Apr 2022, 10:22 PM
šŸ…°ļøšŸ…±ļø
šŸ…°ļøšŸ…±ļø - avatar
- 1
<div> <input type="button" value="press"> </div>
8th Jun 2020, 5:45 PM
Rushikesh Kate
Rushikesh Kate - avatar
- 2
You can do it by ccs and java also
7th Jun 2020, 6:38 PM
怊A$# ā˜† $ING#怋
怊A$# ā˜† $ING#怋 - avatar