# Help! Centering an HTML Scrollbar Vertically!

**URL:** <https://forum.kirupa.com/t/help-centering-an-html-scrollbar-vertically/319266>\
**Category:** web dev\
**Created:** [February 14, 2011, 7:04pm UTC](https://forum.kirupa.com/t/help-centering-an-html-scrollbar-vertically/319266 "2011-02-14T19:04:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![basementfilms](https://avatars.discourse-cdn.com/v4/letter/b/f1d935/32.png) [@basementfilms](https://forum.kirupa.com/u/basementfilms)\
**Post date:** [February 14, 2011, 7:04pm UTC](https://forum.kirupa.com/t/help-centering-an-html-scrollbar-vertically/319266/1 "2011-02-14T19:04:11Z")

</div>

Please somebody help!

I’ve been searching all over for the answer but have no luck so far… :puzzled:  
I have a website built in flash and need to display it in html _perfectly centered_.

Is there any way to have the page automatically vertically scroll to the exact center? So that the scrollbar always is dead center.

Thanks a ton!:krazy:

Here’s my code so far. Its all centered, but the scrollbar is not.

```auto
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<body onLoad="window.scrollTo(0,10);
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Supreme Pierogies | a Delicious Experiance</title>
<script language="javascript">AC_FL_RunContent = 0;</script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
<style type="text/css">
body {
	background-color: #CC0000;
}
</style>
<body bgcolor="#CC0000">
<table width="100%" height="100%" border="0" align="center">
  <tr>
    <td><div align="center">
</head><br>
<!--url's used in the movie-->
<!--text used in the movie-->
<!-- saved from url=(0013)about:internet -->
<script language="javascript">
	if (AC_FL_RunContent == 0) {
		alert("This page requires AC_RunActiveContent.js.");
	} else {
		AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0','width','980','height','688','id','main','align','middle','name','main','src','main','quality','high','bgcolor','#CC0000','allowscriptaccess','sameDomain','allowfullscreen','false','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','main' ); //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=8,0,0,0" name="main" width="980" height="688" align="middle" id="main">
	<param name="allowScriptAccess" value="sameDomain" />
	<param name="allowFullScreen" value="false" />
	<param name="movie" value="main.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#CC0000" />
	<param name="SCALE" value="exactfit">	
	<embed src="main.swf" width="980" height="688" align="middle" quality="high" bgcolor="#CC0000" name="main" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" scale="exactfit" />
	</object>
</center><br>
</div>
</td>
</tr>
</table>
</body>
    </tr>
</noscript>
</body>
</html>

```
