# CSS Table. Vertical Centering not working

**URL:** <https://forum.kirupa.com/t/css-table-vertical-centering-not-working/111277>\
**Category:** Uncategorized\
**Created:** [May 25, 2004, 1:29pm UTC](https://forum.kirupa.com/t/css-table-vertical-centering-not-working/111277 "2004-05-25T13:29:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![as\_clark20](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@as\_clark20](https://forum.kirupa.com/u/as_clark20)\
**Post date:** [May 25, 2004, 1:29pm UTC](https://forum.kirupa.com/t/css-table-vertical-centering-not-working/111277/1 "2004-05-25T13:29:18Z")

</div>

I have just been attempting to create a table in CSS where the text is centred vertically and horizonally. Horizontally is fine, left, right, centre, justify its all good. When I come to vertical the \*\*\*\* text just refuses to line up the middle. I’m going to smash my computer in very shortly if I don’t figure it out.

How do I vertically centre if I can’t use the standard attributes in a CSS sheet?!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 26, 2004, 9:53am UTC](https://forum.kirupa.com/t/css-table-vertical-centering-not-working/111277/2 "2004-05-26T09:53:33Z")

</div>

here’s the link to give you an example.

[CSSnotWorking.html](http://www.brakesint.co.uk/CSSnotWorking.html)

As you can see the text inside the div isn’t aligning vertically to the centre.

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 27, 2004, 9:55am UTC](https://forum.kirupa.com/t/css-table-vertical-centering-not-working/111277/3 "2004-05-27T09:55:26Z")

</div>

vertical-align: middle doesn’t align to center… not the same as valign=middle. thats where you went wrong. =]  
think of vertical-align as the CSS equivalent of an IMG tag’s ‘align’ attribute instead.

you can find tons of stuff on vertical centering on google…  
[http://www.google.com/search?hl=en&ie=UTF-8&q=vertically+center+css](http://www.google.com/search?hl=en&ie=UTF-8&q=vertically+center+css)
