Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Cannot centre page in firefox browser ( it works in Internet Explorer)

Reply
Thread Tools

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

 
 
Bundy
Guest
Posts: n/a
 
      11-19-2006
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
 
Reply With Quote
 
 
 
 
dorayme
Guest
Posts: n/a
 
      11-20-2006
In article <4560e073$0$5589$(E-Mail Removed) m>,
Bundy <(E-Mail Removed)> wrote:

> 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...)

--
dorayme
 
Reply With Quote
 
 
 
 
dorayme
Guest
Posts: n/a
 
      11-20-2006
In article
<(E-Mail Removed)>,
dorayme <(E-Mail Removed)> wrote:


>
> thought better to put the styles for the
> table in the css...)


should read "though better"

--
dorayme
 
Reply With Quote
 
Bundy
Guest
Posts: n/a
 
      11-20-2006
Works.

Thank you

Bundy
 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      11-20-2006
In article <456110a0$0$6604$(E-Mail Removed) m>,
Bundy <(E-Mail Removed)> wrote:

> Works.
>
> Thank you
>
> Bundy


I am glad to have helped. Any other problems?

--
dorayme
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot access control panel or Welcome Centre?? =?Utf-8?B?Tm90b3Jpb3VzIExlZQ==?= Windows 64bit 0 05-27-2007 04:19 PM
Opening a web page in the centre in a browser. Bundy HTML 17 12-24-2006 09:19 AM
When I turn on my PC, it works, works, works. Problem! Fogar Computer Information 1 01-17-2006 12:57 AM
javascript code to centre browser Andrew Crook Javascript 7 07-07-2004 06:59 PM
After rebooting my PC works, works, works! Antivirus problem? Adriano Computer Information 1 12-15-2003 05:30 AM



Advertisments