Re: Vertical align in block link?
- From: Patrick <moi@xxxxxx>
- Date: Sat, 20 Sep 2008 11:20:32 +0200
Le 20.09.2008 04:06, Jonathan N. Little a écrit :
Jim Moe wrote:On 09/19/08 09:06 am, Patrick wrote:I'm trying to align a text vertically in a link displayed as a block.There is no general solution for vertically aligning objects.
But the text is always at top.
Is there a solution?
For special cases where the text is fixed in length two methods are common.
1. Set the line-height to fill the space.
2. Adjust either the top margin or padding.
It would have to be padding if you set the link to display: block, the margin would not be the "clickable" part.
Thanks for the help. I tried to set height: 50%; padding-top: 50%;
It works more or less in Firefox but not Konqueror (block is only half height, text not vertically centered).
Is there really no solution (even not pure CSS, I don't care) working for most browsers?
--
Patrick
.
- Follow-Ups:
- Re: Vertical align in block link?
- From: Jim Moe
- Re: Vertical align in block link?
- References:
- Vertical align in block link?
- From: Patrick
- Re: Vertical align in block link?
- From: Jim Moe
- Re: Vertical align in block link?
- From: Jonathan N. Little
- Vertical align in block link?
- Prev by Date: Re: Use of Headers. Need advice ...
- Next by Date: Re: How can I make a div topmost?
- Previous by thread: Re: Vertical align in block link?
- Next by thread: Re: Vertical align in block link?
- Index(es):
Relevant Pages
|