hello i have a simple logo on a splash page which i want to align to the centre of the page. when i have it dreamweaver 8 it is aligned to the centre of the page but when it is viewed on the browser it goes to the top.

i know splash pages are not a nice thing anyway but i have been asked to add one to the website. i have done this before but for the life of me cannot remember how i done this last time. here is my code up to now.

<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr valign="middle">
	<td align="center" valign="middle">
		<div align="center" style="vertical-align:middle"><table width="770" border="0" align="center" cellpadding="0" cellspacing="0" id="table2">
 			 <tr>
   			   <td align="center" valign="middle"><script type="text/javascript">
					AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0','width','266','height','211','title','logo','src','logo','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','logo' ); //end AC code
					</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase=			"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="266" height="211" title="logo">
      				<param name="movie" value="logo.swf" />
      				<param name="quality" value="high" />
      				<embed src="logo.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="266" height="211"></embed>
			   </object></noscript></td>
  			</tr>
	  </table></div>
	</td>
</tr>
</table>

as you can see i have tried nested tables, div tags, css and the valign attribute of the <td> tag all with no joy.

any help on this would be great.

hye buddy. instead of using the vertical align in style and valign from table propeties. just use this. it might work. use this style in ur div tag style="margin:0 auto; verticalalign:middle;" try it and then tell me

i have gone about it differently now. to make it easier i just made the flash file i was putting on the page a lot bigger centred the first table and it has given me the outcome i wanted.

It is impossible to center something vertically on a web page and have it work on all browsers and screen resolutions.

The internet is not designed to exactly fill a screen, and is not intended to be used in the way you are trying to use it. Web page rendering is designed to start at the top, and expand downward until content is exhausted.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.