|
Posted by Ben C on February 15, 2008, 5:43 pm
Please log in for more thread options > Jonathan N. Little 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..
>>>
>>> pls see http://www.mayacove.com/misc/table/table.html
>>>
>>> not sure how to solve this, "text-align:top" does not exist in css....;)
>>>
>>
>> True because the property is called "vertical-align"
>>
>> td { vertical-align: top; }
>> or
>> td { vertical-align: text-top; }
>>
>> http://www.w3.org/TR/CSS21/visudet.html#propdef-vertical-align
>>
>>
>>
>
> thank you very much.. unfortunately neither one of these worked..
> http://www.mayacove.com/misc/table/table.html
>
> the only way text is where I want it is by eliminating the image.. (I
> guess I need to do separate <td> for img and text, but I was trying to
> avoid that..)
You can set vertical-align: top on the <a> to bring it to the top of its
line-box (whose height in this case corresponds to that of the <img>).
.alignTop a { vertical-align: top }
Or just float the image as rf suggested.
|