Skip to main content
Minor grammatical edits
Source Link
Rich
  • 6.6k
  • 20
  • 39
  • 58

You could just make:

<div style="text-align: center; border: 1px solid"> <input type="button" value="button"> </div>

Or you could do it like this instead:

<div style="border: 1px solid"> <input type="button" value="button" style="display: block; margin: 0 auto;"> </div>

The first one will center align everything inside the div. The other one will center align just the button.

You could just make

<div style="text-align: center; border: 1px solid"> <input type="button" value="button"> </div>

Or you could do it like this instead

<div style="border: 1px solid"> <input type="button" value="button" style="display: block; margin: 0 auto;"> </div>

The first one will center align everything inside the div. The other one will center align just the button.

You could just make:

<div style="text-align: center; border: 1px solid"> <input type="button" value="button"> </div>

Or you could do it like this instead:

<div style="border: 1px solid"> <input type="button" value="button" style="display: block; margin: 0 auto;"> </div>

The first one will center align everything inside the div. The other one will center align just the button.

youYou could just make

<div style="text-align: center; border: 1px solid"> <input type="button" value="button"> </div>

Or ouyou could do it like this instead

<div style="border: 1px solid"> <input type="button" value="button" style="display: block; margin: 0 auto;"> </div>

The first one will center align everything inside the div. The other one will center align just the button.

you could just make

<div style="text-align: center; border: 1px solid"> <input type="button" value="button"> </div>

Or ou could do like this

<div style="border: 1px solid"> <input type="button" value="button" style="display: block; margin: 0 auto;"> </div>

The first one will center align everything inside the div. The other one will center align just the button.

You could just make

<div style="text-align: center; border: 1px solid"> <input type="button" value="button"> </div>

Or you could do it like this instead

<div style="border: 1px solid"> <input type="button" value="button" style="display: block; margin: 0 auto;"> </div>

The first one will center align everything inside the div. The other one will center align just the button.

Converting Code to a Demo
Source Link
dota2pro
  • 8k
  • 8
  • 51
  • 87

you could just make

<div style="text-align: center;"> <input type="button" value="button"> </div> 

<div style="text-align: center; border: 1px solid"> <input type="button" value="button"> </div>
 

Or ou could do like this

<div> <input type="button" value="button" style="display: block; margin: 0 auto;"> </div> 

<div style="border: 1px solid"> <input type="button" value="button" style="display: block; margin: 0 auto;"> </div>

The first one will center align everything inside the div. The other one will center align just the button.

you could just make

<div style="text-align: center;"> <input type="button" value="button"> </div> 

Or ou could do like this

<div> <input type="button" value="button" style="display: block; margin: 0 auto;"> </div> 

The first one will center align everything inside the div. The other one will center align just the button.

you could just make

<div style="text-align: center; border: 1px solid"> <input type="button" value="button"> </div>
 

Or ou could do like this

<div style="border: 1px solid"> <input type="button" value="button" style="display: block; margin: 0 auto;"> </div>

The first one will center align everything inside the div. The other one will center align just the button.

Source Link
RenatoSz
  • 1.7k
  • 2
  • 12
  • 8
Loading