Cannot centre page in firefox browser ( it works in Internet Explorer)

B

Bundy

Hi

I cannot centre the following page in firefox browser. It does work in
internet explorer.

CSS (in external file - testcssglobal.css)

body {
text-align: center;
margin: 0px;
padding: 0px;

}

#global {
position: relative;
width: 800px;
text-align: left;
}

HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>testing css</title>
<link href="css/testcssglobal.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div id="global">
<table width="800" border="10">
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>

</div>
</body>
</html>

Your help will be appreciated.

Regards

Bundy
 
D

dorayme

Bundy said:
Hi

I cannot centre the following page in firefox browser. It does work in
internet explorer.

CSS (in external file - testcssglobal.css)

body {
text-align: center;
margin: 0px;
padding: 0px;

}

#global {
position: relative;
width: 800px;
text-align: left;
}


Try instead of all the above:

body {margin:0;padding:0;}

table {margin:auto;}


(given your html... thought better to put the styles for the
table in the css...)
 

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

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top