Computing.Net > Forums > Web Development > valign=top not working

valign=top not working

Reply to Message Icon

Original Message
Name: brds
Date: March 31, 2006 at 10:21:50 Pacific
Subject: valign=top not working
OS: XP
CPU/Ram: 512
Model/Manufacturer: Dell
Comment:

Hello,
I'm making a web page for one of my projects in school. I have a side menu bar in a cell which is then in another cell. I want the menu to stay at the top of the screen, but when text on the page gets long, the menu drops down more and more on the page.

I put in the <td valign="top">, but that still doesn't work.

If you want to see the entire page...
http://www.tehbrds.com/homework/


Report Offensive Message For Removal

Response Number 1
Name: Michael J (by mjdamato)
Date: March 31, 2006 at 11:17:27 Pacific
Subject: valign=top not working
Reply: (edit)

The problem is that the cells you are using the valign property in are in a table which is in another TD. That table is positioned in the middle (vertically) within the containing TD! You need to use the valign property in the containing TD to make that tabe at that top.

One trick I use in such situations is to temporarily use borders on the tables so I can see exactly what is where.

here is the line in question:

<td width="15%" height="83%" bgcolor="#009900" valign=top>

By the way, you have some duplicative and unecessary code - basically you need to do some cleanup. for instance you have a CENTER tag within another CENTER tag.

Michael J


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: valign=top not working

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software