Browser Div Centering Problem

S

Sylv

Hello,

Below HTML code is my aspx page, when running on IE6.0+, my aspx page's DIV
is centered,

but when running on OPERA, FIREFOX or CHROME, it s placed on the left side
of these browsers, Not centered

What should I do ?

Thanks for your answer

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<style type="text/css">
.style1
{
width: 950px;
}
</style>
</head>
<body background="Resources/BackGround.jpg">
<form id="frmDefault" runat="server">
<div style="text-align: center">
<table cellpadding="0" cellspacing="0" class="style1">

....... bla bla bla

</table>
</div>
</form>
</body>
</html>
 
J

JM

Ok now
Solved giving this;

<div style="margin-right:auto;margin-left:auto;width:950px;">

Or, do it the right way.. ;-)

In the page <head> put..

<style type="text/css">
#wrapper{
width: 950px;
margin: 0 auto;
}
</style>

<div id="wrapper">

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top