You are here: Re: how can i get vertical align? « HTML « IT news, forums, messages
Re: how can i get vertical align?

Posted by Jonathan N. Little on 06/18/05 15:44

Giorgio wrote:

> Hi,
> I use this code to extend <A> area to all the black cell, but i can't center
> the links vertically.
> Can you help me, please?
>
> Thanks
>
<snip code>

the LINKS are vertically aligned within the table cells, see for
yourself by adding a border to the links:


td a {
display:block;
width:40px;
height: 40px;
line-height: 40px;
background-color:#000000;
vertical-align: middle;
color: #ffffff;
text-align:center;
text-decoration:none;
font-family:verdana;
font-weight:bold;
border: 1px solid red; /* add this */
}

now try this and see what one of your problems are...

td a {
display:block;
width:40px;
/* disable this 'height: 40px;' */
line-height: 40px; /* add this */
background-color:#000000;
vertical-align: middle;
color: #ffffff;
text-align:center;
text-decoration:none;
font-family:verdana;
font-weight:bold;
border: 1px solid red; /* add this */
}




--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация