center - Centering multiple input elements with equal space in CSS -


i've got radio buttons text. how can center stuff, first button same 'margin-left' 'margin-right' of last letter of p of last input?

html

<div class='someclass'>     <input type='radio' name='somename'>example     <input type='radio' name='somename'>other text </div> 

css

.someclass{     width:400px}  .someclass input{     float:left} 

you may use display: inline-block elements put theme in line, still keep wide box model properties margin, padding, etc them:

.someclass{    text-align: center;  }  .someclass .inputs{    display: inline-block;   }
<div class='someclass'>      <p class="inputs"><input type='radio' name='somename'>example</p>      <p class="inputs"><input type='radio' name='somename'>other text</p>  </div>


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -