AdminLTE 超華麗網頁 Backend 後台設計風格

這個後台設計別人介紹給我用的。它的作用就是類似 Bootstrap ,提供大量十分美,十分實用的元素給大家使用。雖然它叫 AdminLTE,但用在 Front end 其實也不過份。

沒有設計天份,CSS苦手或想快速起一個 CMS 的 Web Developer 們可以留意下 AdminLTE 吧。


Alternative way to center a text element vertically with unknown parent height.

Centering a text element vertically in CSS is a crazy task. Because “vertical-align: middle” is not working sometimes. In fact, vertical-align works with Image only.

If you know the parent height already, you can set the line-height and height with same value in order to centering the element, for example:

line-height: 10px;
height: 10px;

However, what if I don’t know the height? You have 2 choices:

  1. Use table and set <td> with vertical-align: middle;
  2. You can re-style the button and make it look like a div.

The following link show it works.

these are strange and ugly ways, but works! 🙂