M
M
Mikhail Petrov2016-03-30 19:21:12
css
Mikhail Petrov, 2016-03-30 19:21:12

How to wrap checkbox in label. am I using bootstrap?

Good afternoon, I got confused, I want to wrap the checkbox in a label. I'm using bootstrap
and I can't find in css how to align the checkbox' a square and the text so that it's evenly centered.
So now: x1MqYPH.png
I want this:I8JyE87.png

<label class="label label-primary"><input type="checkbox"> Samsung</label>

I'm a noob, thanks for the help, oh dear gurus.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
shnicel, 2016-03-30
@shnicel

As a quick variant, try with line-height and play around

D
drtvader, 2016-03-31
@drtvader

You can't edit a checkbox just like that.
I would do like this:

<div>
<input type="checkbox">
<label class="label label-primary">Samsung</label>
</div>

For div background and the rest you align. For label vertical-aligh: middle; as an option
Either the text in the span and vertical-aligh for it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question