---
title: "how to set text vertically middle using css ?"  
description: "how to set text vertically middle using css ?"  
author: "Takeshi Okada"  
published: 2013-02-26  
updated: 2013-02-26  
canonical: https://www.mindstick.com/forum/611/how-to-set-text-vertically-middle-using-css  
category: "css-css3"  
tags: ["css-css3"]  
reading_time: 1 minute  

---

# how to set text vertically middle using css ?

Hi [Expert](https://www.mindstick.com/articles/13120/an-expert-financial-advice-will-improve-your-finances)!

I have two [control](https://www.mindstick.com/blog/197/asp-dot-net-repeater-control) within div, one is [checkbox](https://www.mindstick.com/articles/291/how-should-use-checkbox-control-in-vb-dot-net) and other one is [label](https://www.mindstick.com/articles/12835/print-label-tracking-how-do-these-features-make-auspost-woocommerce-plugin-better). I want to set label as vertically middle. I have used [vertical](https://www.mindstick.com/forum/12951/how-to-fix-bootstrap-tab-vertical-with-text)-align:middle and text-align:center; but this is not worked.\
Please help me!

my code as below

<div>\
<[input](https://www.mindstick.com/forum/159209/how-can-i-read-convert-an-input-stream-into-a-string-in-java) type="checkbox" id="chk" [style](https://www.mindstick.com/articles/126300/apa-citation-style-get-to-know-about-it-for-your-next-assignment)="width: 25px; height: 25px; [background](https://www.mindstick.com/articles/65/how-to-change-background-color-of-tab-control-in-c-sharp)-[color](https://www.mindstick.com/articles/77/how-to-split-form-background-color-in-c-sharp):#E5E5E5;" />\
<label for="chk" id="lblChk">\
[Product](https://www.mindstick.com/articles/75385/full-product-keys)</label>\
</div>

Any suggestion will be appreciated!

Thanks in advance.

## Replies

### Reply by AVADHESH PATEL

Hi Takeshi!

Try this way

vertical-align:super;

Your modify code as below

```
<div>
    <input type="checkbox" id="chk" style="width: 25px; height: 25px; background-color:#E5E5E5;" />
    <label for="chk" id="lblChk" style="vertical-align:super;">
        Product</label>
</div>
```


---

Original Source: https://www.mindstick.com/forum/611/how-to-set-text-vertically-middle-using-css

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
