Posted by Barbara de Zoete on 04/29/06 01:02
On Fri, 28 Apr 2006 23:58:56 +0200, Trevor <trevordixon@gmail.com> wrote:
> Note the following html code:
>
> <div id="linkbar">
> <p>
> links
> </p>
> </div>
>
> Now take a look at this CSS:
>
> #linkbar {
> height: 30px;
> text-align: center;
> }
>
> #linkbar p {
> vertical-align: middle;
> }
>
> Why isn't the text in the div aligned vertically?
Vertical align is a property that works with table cells only.
> What's the best way
> to do what I want?
Add display:table-cell; to the selector #linkbar p
--
______PretLetters:
| weblog | http://www.pretletters.net/weblog/weblog.html |
| webontwerp | http://www.pretletters.net/html/webontwerp.html |
|zweefvliegen | http://www.pretletters.net/html/vliegen.html |
Navigation:
[Reply to this message]
|