Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Aligning text a top of cell

Status
Not open for further replies.

cisco999

Programmer
Apr 26, 2001
66
0
0
US
New to CSS. I have two table cells, the text of the first should line up with the top of the 2nd cell instead of the center. Is this possible? Following is the CCS code:
.labelTop
{
HEIGHT: 20px;
vertical-align: top;
PADDING-LEFT: 5px;
PADDING-RIGHT: 5px;
WIDTH: 20%;
text-indent: 3px;
}
.outputDataLeft
{
color: #000000;
white-space: wrap;
text-align: left;
}

Following is the HTML source:
<TR>
<TD name="CHANGE_DESClabel" class="labelTop">Chg Description</TD>

<TD>
<SPAN name="CHANGE_DESC" class="outputDataLeft">NOTE: This eco has been re-issued because some related items were missed. Although you may have worked on this previouslyThe instruction sheet for the Passage tool rail and shelf (INS230) is not accurate. Replace this instruction sheet with pn 1B2LW7. The sheet details how the Passage tool rail is attached to a desk. The instruction sheet change involves removing the allen wrench and set screw which are not used. Remove INS230 from all bills and replace with 1B2LW7. Mainframe: set up part number 1B2LW7 in "E" division. Part number 1B2LW7 has been added to drawings G70000, 47272007, and 47272008 on this eco. Release for production service part drawings UGY04J and UGY04C. Set up part number 1B2LW7 in Mapics (description = tool rail instruction sheet) Add part number 1B2LW7 to Mapics BOM (replaces INS230) for: G7000.14 G7000.29 G7311.27F G7311.14L G7311.14R </SPAN>
</TD>
</TR>

Thanks for your assistance.
 
I added style='vertical-align:top' directly to the HTML and I achieved the desired affect. Not sure why it didn't work in the CSS file.
 
You can put the CSS style

Code:
vertical-align:top

on both cells, that will align the first line on both TD's with each other.

[small]"I see pretty girls everywhere I look, everywhere I look, everywhere I look. - Band song on movie "The Ringer"[/small]
<.
 
define the CSS style
Code:
.labelTop
    {
    HEIGHT: 20px;
    vertical-align: top;
    PADDING-LEFT: 5px;
    PADDING-RIGHT: 5px;
    WIDTH: 20%;
    text-indent: 3px;
    }
as
Code:
[!]td[/!].labelTop
    {
    HEIGHT: 20px;
    vertical-align: top;
    PADDING-LEFT: 5px;
    PADDING-RIGHT: 5px;
    WIDTH: 20%;
    text-indent: 3px;
    }


[small]"I see pretty girls everywhere I look, everywhere I look, everywhere I look. - Band song on movie "The Ringer"[/small]
<.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top