Click here to get back home

table: valign-top problem

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
table: valign-top problem maya 02-15-2008
Get Chitika Premium
Posted by Bergamot on February 15, 2008, 6:38 pm
Please log in for more thread options
maya wrote:
> I have an image and right next to the image I have some text, all w/in
> the same <td>.. but, even though I have valign="top" for the <td>, the
> text does not appear on top of the <td>, it appears flush with the
> BOTTOM of the image..

<img> is aligned at baseline by default. The line-height automatically
stretches to the height of the image so the text baseline and bottom of
the image are aligned. Changing the vertical alignment on the td won't
change this.

> pls see http://www.mayacove.com/misc/table/table.html
>
> not sure how to solve this, "text-align:top" does not exist in css....;)

http://www.w3.org/TR/CSS21/visudet.html#propdef-vertical-align

img or
img

That will align the top of the image with the top of the text. Keep in
mind that includes space for capital letters and ascenders.

--
Berg

Posted by maya on February 19, 2008, 12:33 pm
Please log in for more thread options
Bergamot wrote:
> maya wrote:
>> I have an image and right next to the image I have some text, all w/in
>> the same <td>.. but, even though I have valign="top" for the <td>, the
>> text does not appear on top of the <td>, it appears flush with the
>> BOTTOM of the image..
>
> <img> is aligned at baseline by default. The line-height automatically
> stretches to the height of the image so the text baseline and bottom of
> the image are aligned. Changing the vertical alignment on the td won't
> change this.
>
>> pls see http://www.mayacove.com/misc/table/table.html
>>
>> not sure how to solve this, "text-align:top" does not exist in css....;)
>
> http://www.w3.org/TR/CSS21/visudet.html#propdef-vertical-align
>
> img or
> img
>
> That will align the top of the image with the top of the text. Keep in
> mind that includes space for capital letters and ascenders.

that did it! thank you very much....



Similar ThreadsPosted
Problem with table width? July 19, 2004, 10:45 pm
table percentage problem August 20, 2004, 10:11 am
Table widths problem October 6, 2004, 11:40 pm
Problem with TABLE WIDTH January 5, 2005, 6:53 pm
table alignment problem January 30, 2005, 10:48 pm
Problem with table 100% width June 8, 2005, 8:18 am
Problem With Button In Table September 2, 2005, 12:08 pm
Re: html table problem February 6, 2006, 5:59 pm
Table layout problem in Firefox/IE6 June 14, 2005, 8:42 am
Frontpage problem/ using css to center TABLE - help...! June 15, 2005, 1:05 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap