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!

valign top table cell is not valigned top?! 1

Status
Not open for further replies.

JavaSprout

Programmer
Jul 31, 2001
30
0
0
BE
When you display the following HTML in a browser (I use IE 6.0), you will see 3 'rows' of menus. They should all be tidyly at the top, 1 after another. Unfortunately the 1st row is OK, but the other 2 rows are halfway down the page!

I specify valign="top" but this doesn't seem to work.

Any ideas why this is not working?

Thanks.


Hugh Prior


<!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;<html>
<head>
<title>LocalPin regional search engine - Find it where you are</title>
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;>
<link href=&quot;/localpindev/style.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;>
</head>
<body>
<table width=&quot;100%&quot;>
<tr valign=&quot;top&quot;>
<td width=&quot;98%&quot;> <table cellpadding=6 cellspacing=6>
<tr>
<td><p><a href=&quot;/localpindev/index.php&quot;>Home</a></td>
<td><p><a href=&quot;/localpindev/phpbb/index.php&quot;>Forums</a></p></td>
<td><a href=&quot;/localpindev/main/contact_info.php&quot;>Contact</a></td>
<td><a href=&quot;/localpindev/main/about.php&quot;>About</a></td>
<td><a href=&quot;/localpindev/main/link_to_us.php&quot;>Link to us</a></td>
<!-- <td><a href=&quot; forum</a></td>-->
<td><a href=&quot;/localpindev/main/account.php&quot;>Member Area</a></td>
<td><a href=&quot;/localpindev/main/submit_a_site.php&quot;>Submit A Site</a></td>
<td><a href=&quot;/localpindev/main/investors.php&quot;>Investors</a></td>
<td><a href=&quot;/localpindev/main/press.php&quot;>Press</a></td>
<td><a href=&quot;/localpindev/static&quot;>World</a></td>
<td><a href=&quot;/localpindev/main/help.php&quot;>Help</a></td>
<td></td>
<td>Logged in as <b>advertiser</b></td>
</tr>
</table></td>
<td width=&quot;2%&quot; rowspan=&quot;2&quot;>
<!-- FASTCLICK.COM 120x600 v1.4 for localpin.com -->
<div align=&quot;center&quot;>
<script language=&quot;JavaScript&quot; type=&quot;text/javascript&quot;><!--
var i=j=p=t=u=x=z=dc='';var id=f=0;var f=Math.floor(Math.random()*7777);
id=9811; dc=document;u='ht'+'tp://media.fastclick.net/w'; x='/get.media?t=n';
z=' width=120 height=600 border=0 ';t=z+'marginheight=0 marginwidth=';
i=u+x+'&sid='+id+'&m=3&f=b&v=1.4&c='+f+'&r='+escape(dc.referrer);
u='<a hr'+'ef=&quot;'+u+'/click.here?sid='+id+'&m=3&c='+f+'&quot; target=&quot;_blank&quot;>';
dc.writeln('<ifr'+'ame src=&quot;'+i+'&d=f&quot;'+t+'0 hspace=0 vspace=0 frameborder=0 scrolling=no>');
if(navigator.appName.indexOf('Mic')<=0){dc.writeln(u+'<img src=&quot;'+i+'&d=n&quot;'+z+'></a>');}
dc.writeln('</iframe>'); // --></script>
<noscript>
<a href=&quot; target=&quot;_blank&quot;>
<img src=&quot;width=&quot;120&quot; height=&quot;600&quot; border=&quot;1&quot; /></a>
</noscript>
<!-- FASTCLICK.COM 120x600 v1.4 for localpin.com -->
<br>
<br>
<!-- BEGIN WEBSIDESTORY CODE -->
<!-- COPYRIGHT 1997-2001 WEBSIDESTORY, INC. ALL RIGHTS RESERVED. U.S.PATENT PENDING. Privacy notice at: -->
<!-- webbot bot=&quot;HTMLMarkup&quot; startspan -->
<script language=&quot;JavaScript&quot; type=&quot;text/javascript&quot;>
var _pn=&quot;PUT+PAGE+NAME+HERE&quot;; //page name
var _acct=&quot;WQ521014PMRW61EN7&quot;; //account number
var _pndef=&quot;title&quot;;var _hcv=65;var _mn=&quot;wf155&quot;;
var _lp=location.protocol.indexOf('https')==0?&quot; var _gn=&quot;hg1.hitbox.com&quot;;function _ps(_h){if(_h.indexOf(&quot;PUT+PAGE+NAME+HER&quot;)==0) {
if (_pndef==&quot;title&quot;){return document.title?document.title:_pndef;}else{
var _g=location.pathname;_h=_g.substring(_g.lastIndexOf(&quot;/&quot;)+1,_g.length);
if(_h==&quot;&quot;){return _pndef};}};return _h;}var _sv=10;var _bn=navigator.appName;
if(_bn.substring(0,9)==&quot;Microsoft&quot;){_bn=&quot;MSIE&quot;;};var _bv=Math.round(parseFloat(navigator.appVersion)*100);
if((_bn==&quot;MSIE&quot;)&&(parseInt(_bv)==2))_bv=301;var _rf=escape(document.referrer);_pn=_ps(_pn);
var _hbfa=&quot;<a href=' target='_top'><img src='&quot;;
var _hbfc=&quot;' border=0 width=125 height=125></a><div><font face='MS Sans Serif,Arial,Helvetica '&quot;+
&quot;size=1><a href=' target='_blank'>privacy</a></font></div>&quot;;
var _hbfb=&quot;&quot;;</script>
<script language=&quot;JavaScript1.1&quot; type=&quot;text/JavaScript1.1&quot; id=&quot;_hbc&quot;>_sv=11;</script>
<script
language=&quot;JavaScript1.1&quot; src=&quot; type=&quot;text/JavaScript1.1&quot;></script>
<script language=&quot;JavaScript&quot; type=&quot;text/javascript&quot;>
if(_hbfb.length!=0){document.write(_hbfa+_hbfb+_hbfc);}else{if((_rf==&quot;undefined&quot;)||(_rf==&quot;&quot;)){
_rf=&quot;bookmark&quot;;};document.write(_hbfa+_lp+_gn+&quot;/HG?hc=&quot;+_mn+&quot;&l=1&hb=&quot;+_acct+&quot;&n=&quot;+escape(_pn)+
&quot;&cd=1&bt=2&bn=&quot;+escape(_bn)+&quot;&bv=&quot;+_bv+&quot;&ss=na&sc=na&dt=&sv=&quot;+_sv+&quot;&ja=na&ln=na&pl=&rf=&quot;+_rf+_hbfc);}
</script>
<noscript>
<a href=&quot; target=&quot;_top&quot;><img
src=&quot; border=&quot;0&quot; width=&quot;125&quot; height=&quot;125&quot; /></a>
</noscript>
<noscript>
<div align=&quot;center&quot;><font face=&quot;MS Sans Serif,Arial,Helvetica&quot; size=&quot;1&quot;><a
href=&quot; target=&quot;_blank&quot;>privacy</a></font></div>
</noscript>
<!--//-->
<!-- webbot bot=&quot;HTMLMarkup&quot; endspan -->
<!-- END WEBSIDESTORY CODE -->
</div></td>
</tr>
<tr valign=&quot;top&quot;>
<td valign=&quot;top&quot;> <table cellpadding=6 cellspacing=6>
<tr>
<td>MEMBER AREA MENU:</td>
<td><a href=account.php?action=general>General Tasks</a></td>
<td><a href=account.php?action=box>Box Owner Tasks</a></td>
<td><a href=account.php?action=advertiser>Advertiser Tasks</a></td>
<td><a href=account.php?action=partner>Partner Tasks</a></td>
<td><a href=account.php?action=admin>Admin Tasks</a></td>
</tr>
</table>
<table cellpadding=6 cellspacing=6>
<tr>
<td>ADMIN MENU:</td>
<td><a href='locs_maintain.php?loc_key=1'>Locations</a></td>
<td><a href='cats_maintain.php?cat_key=1'>Categories</a></td>
<td><a href='terms_maintain.php'>Search Terms</a></td>
<td><a href='langs_maintain.php'>Languages</a></td>
<td><a href='money_maintain.php'>Accounts</a></td>
<td><a href='log_listing_analysis.php'>Listing Log</a></td>
<td><a href='log_click_analysis.php'>Click Log</a></td>
<td><a href='locs_verify.php'>Verify locaions</a></td>
<td><a href='db_maintain.php'>Maintain database</a></td>
</tr>
</table>
<p class=&quot;err_msg&quot;></p></td>
</tr>
</table>
<div align=center> </div>
</body>
</html>
 
do you have a URL we could visit instead, it's kind of hard to see the menu's properly without the style sheet, althought they seem to aligh fine in my browser - IE5
 
OK, check out this URL:


Looks pretty unaligned to me.

(Note, it's supposed to look REALLY ugly - it is hugely simplified from the normal site pages, in order to show the problem).

Thanks,


Hugh
 
Hi JavaSprout,

It's the BIG <div> with all the javascript and WEBBOT stuff in the second row that causes this problem.

Just put it somewhere else (for example at the bottom) of your file.

Another solution is could be to position it like:

<div style=&quot;position:absolute&quot; align=&quot;center&quot;>

Hope this helps,
Erik
<-- My sport: Boomerang throwing !!
!! Many Happy Returns !! -->
 
I made quickly some changes with the tables,
You have to check it, but I think it's in the right direction you want to go

Try this JavaSprout:

<!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;<html>
<head>
<title>LocalPin regional search engine - Find it where you are</title>
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;>
<link href=&quot;/localpindev/style.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;>
</head>
<body>
<table width=&quot;100%&quot;>
<tr valign=&quot;top&quot;>
<td width=&quot;98%&quot;> <table cellpadding=6 cellspacing=6>
<tr>
<td><p><a href=&quot;/localpindev/index.php&quot;>Home</a></td>
<td><p><a href=&quot;/localpindev/phpbb/index.php&quot;>Forums</a></p></td>
<td><a href=&quot;/localpindev/main/contact_info.php&quot;>Contact</a></td>
<td><a href=&quot;/localpindev/main/about.php&quot;>About</a></td>
<td><a href=&quot;/localpindev/main/link_to_us.php&quot;>Link to us</a></td>
<!-- <td><a href=&quot; forum</a></td>-->
<td><a href=&quot;/localpindev/main/account.php&quot;>Member Area</a></td>
<td><a href=&quot;/localpindev/main/submit_a_site.php&quot;>Submit A Site</a></td>
<td><a href=&quot;/localpindev/main/investors.php&quot;>Investors</a></td>
<td><a href=&quot;/localpindev/main/press.php&quot;>Press</a></td>
<td><a href=&quot;/localpindev/static&quot;>World</a></td>
<td><a href=&quot;/localpindev/main/help.php&quot;>Help</a></td>
<td></td>
<td>Logged in as <b>advertiser</b></td>
</tr>
</table>
<table cellpadding=6 cellspacing=6>
<tr>
<td>MEMBER AREA MENU:</td>
<td><a href=account.php?action=general>General Tasks</a></td>
<td><a href=account.php?action=box>Box Owner Tasks</a></td>
<td><a href=account.php?action=advertiser>Advertiser Tasks</a></td>
<td><a href=account.php?action=partner>Partner Tasks</a></td>
<td><a href=account.php?action=admin>Admin Tasks</a></td>
</tr>
</table>
<table cellpadding=6 cellspacing=6>
<tr>
<td>ADMIN MENU:</td>
<td><a href='locs_maintain.php?loc_key=1'>Locations</a></td>
<td><a href='cats_maintain.php?cat_key=1'>Categories</a></td>
<td><a href='terms_maintain.php'>Search Terms</a></td>
<td><a href='langs_maintain.php'>Languages</a></td>
<td><a href='money_maintain.php'>Accounts</a></td>
<td><a href='log_listing_analysis.php'>Listing Log</a></td>
<td><a href='log_click_analysis.php'>Click Log</a></td>
<td><a href='locs_verify.php'>Verify locaions</a></td>
<td><a href='db_maintain.php'>Maintain database</a></td>
</tr>
</table>
<table cellpadding=6 cellspacing=6>
<tr valign=&quot;top&quot;>
<td valign=&quot;top&quot;>
<p class=&quot;err_msg&quot;>Here comes the rest of your pages I assume<br><br>
I hope this helps,<br>
Boomerang :)
</p></td>
</tr>
</table>
</td>
<td width=&quot;2%&quot; >

<!-- FASTCLICK.COM 120x600 v1.4 for localpin.com -->
<script language=&quot;JavaScript&quot; type=&quot;text/javascript&quot;><!--
var i=j=p=t=u=x=z=dc='';var id=f=0;var f=Math.floor(Math.random()*7777);
id=9811; dc=document;u='ht'+'tp://media.fastclick.net/w'; x='/get.media?t=n';
z=' width=120 height=600 border=0 ';t=z+'marginheight=0 marginwidth=';
i=u+x+'&sid='+id+'&m=3&f=b&v=1.4&c='+f+'&r='+escape(dc.referrer);
u='<a hr'+'ef=&quot;'+u+'/click.here?sid='+id+'&m=3&c='+f+'&quot; target=&quot;_blank&quot;>';
dc.writeln('<ifr'+'ame src=&quot;'+i+'&d=f&quot;'+t+'0 hspace=0 vspace=0 frameborder=0 scrolling=no>');
if(navigator.appName.indexOf('Mic')<=0){dc.writeln(u+'<img src=&quot;'+i+'&d=n&quot;'+z+'></a>');}
dc.writeln('</iframe>'); // --></script>
<noscript>
<a href=&quot; target=&quot;_blank&quot;>
<img src=&quot;width=&quot;120&quot; height=&quot;600&quot; border=&quot;1&quot; /></a>
</noscript>
<!-- FASTCLICK.COM 120x600 v1.4 for localpin.com -->
</td>
</tr>

</table>

</body>
</html>

Hope this helps,
Erik

<-- My sport: Boomerang throwing !!
!! Many Happy Returns !! -->
 
Well you could knock me over with a bent piece of wood!

Thanks Boomerang!!


Stunning. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top