forum

Home / DeveloperSection / Forums / how to set text vertically middle using css ?

how to set text vertically middle using css ?

Takeshi Okada 2380 26-Feb-2013

Hi Expert!

I have two control within div, one is checkbox and other one is label. I want to set label as vertically middle. I have used vertical-align:middle and text-align:center; but this is not worked.
Please help me!

my code as below

<div>
    <input type="checkbox" id="chk" style="width: 25px; height: 25px; background-color:#E5E5E5;" />
    <label for="chk" id="lblChk">
        Product</label>
</div>

Any suggestion will be appreciated!

Thanks in advance.


Updated on 26-Feb-2013

Can you answer this question?


Answer

1 Answers

Liked By