How do I center a <div> tag?

On this page:

http://www.glowfishtw.com/flagfootball/tinymce/examples/updatenewsscroller.asp

I want the two div boxes to be in the center of the page. How do I do this? Thanks, I'm new at using div tags.
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../../Connections/flagfootball.asp" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>update news scroller</title>
 
 
 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><style type="text/css">
<!--
body {
	background-color: #999999;
	text-align: center;
}
.updatetext {
	background-color: #FFFFFF;
	height: 40px;
	width: 400px;
	vertical-align: top;
	text-align: center;
	margin-left: 0px;
	background-position: center;
}
.headerfooter {
	font-size: 12px;
	color: #000000;
	background-color: #FFFFFF;
	margin: 0px;
	padding: 0px;
	height: 25px;
	width: 400px;
}
-->
</style>
</head>
<body>
  <div class="updatetext">  
    <h1>Update News Scroller<br />
      <br />
    </h1>
</div>
 
  <div class="headerfooter">
  The text that you type below will appear in the news scroller.
  </div>
<form name="newsscroller" action="<%=MM_editAction%>" method="POST" id="newsscroller">
 
<div align="center">
	  <!-- Gets replaced with TinyMCE, remember HTML in a textarea should be encoded -->
	  <textarea id="elm1" name="elm1" rows="15" cols="80" style="width: 80%"><%=(rsnewsscroller.Fields.Item("newsscroll").Value)%></textarea>
	  
    <br />
	  <input type="submit" name="save" value="Submit" />
	  <input type="reset" name="reset" value="Reset" />
    </div>
 
<input type="hidden" name="MM_update" value="newsscroller" />
<input type="hidden" name="MM_recordId" value="<%= rsnewsscroller.Fields.Item("ID").Value %>" />
</form>
 
</body>
</html>

Open in new window

LVL 4
elliottbenzleAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

whegaCommented:
try <div align=center>
0
quincydudeCommented:
try

body {
        background-color: #999999;
        text-align: center;
        margin: auto;
}
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TomMicrosoft ISV PartnerCommented:
div{margin-right:auto;margin-left:auto;width:740px;}
0
spikeyman00Commented:
container{
float:left;
width:set to the width of the 2 divs together
margin:0 auto;
}
div1, div2 {
float:left;
width: half of the container
}
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.