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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Microsoft DHTML Table question 2

Status
Not open for further replies.

Mighty

Programmer
Feb 22, 2001
1,682
US
In my company intranet, I use the DHTML insertRow method to add rows to tables on some of my pages. Everybody uses IE so it's not a problem.

However, when I add a row, I want to set the vertical alignment to TOP and I can't figure out how to do it. Has anyone got any experience with this.

Mighty :)
 
Mighty,

the "valign" attribute/property is part of the TD or "Cell" not the Row.

Hope that helps
-pete

 
you can still use &quot;valign&quot; in a <tr>

you might also try CSS: vertical-align:top;


=========================================================
while (!succeed) try();
-jeff
 
Jeff,

Your right, I was wrong. Man i thought i had tried that years ago and it didn't work!! What a dope! LOL

thanks
-pete

 
jeff,

Not quite what I was looking for but it gave me a good idea. Here's what I got to work:

// Add a new row
newRow = document.all.reqTable.insertRow();

// Add a cell to store the requirement number
newCell = newRow.insertCell();
newCell.align = 'center';
newCell.style.verticalAlign = 'top';

Thanks!!

Mighty :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top