html - Centering elements in custom radio button label -


i'm using bootstrap 3 , trying center radio button, icon, , text , having no luck.

my form simply stuffing inside label tag seems lot.

the skeleton code started below:

<form role="form">             <label class="radio-inline">                 <input type="radio" name="optradio">                 <br/>                 <div class="iconone"></div>                 <br/>                 option 1             </label>             <label class="radio-inline">                 <input type="radio" name="optradio">                 <br/>                 <div class="icontwo"></div>                 <br/>                 option 2             </label>             <label class="radio-inline">                 <input type="radio" name="optradio">                 <br/>                 <div class="iconthree"></div>                 <br/>                 icon 3             </label>         </form> 

here's js fiddle:

http://jsfiddle.net/4zh28rcn/4/

i'm tempted try flexbox wary of importing more third party libraries.

thanks helpful pointers!

i'm not sure it's coming from, appear have stray alignment pushing <input> 20px left of ought be.

if add css below have in fiddle already, see radio buttons, icon images , text centered , lined up:

.radio-inline { width: 100px; padding: 0; text-align: center; }  input { display: block; position: relative; left: 20px; width: 100%; } 

Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -