CSS - Margin: Auto; Not working in IE

This is a discussion on "CSS - Margin: Auto; Not working in IE" within the Web Page Design section. This forum, and the thread "CSS - Margin: Auto; Not working in IE are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Feb 11th, 2006, 06:36
Reputable Member
Join Date: Sep 2005
Location: Canada, BC
Age: 24
Posts: 239
Thanks: 0
Thanked 0 Times in 0 Posts
CSS - Margin: Auto; Not working in IE

Normaly this works,infact, I have sites with almost the exact same code and it does work. but for some reason, its not working on this site, can someone figure out whats wrong? Because I can't
This is the site
HTML: Select all
<?xml version="1.0" encoding="UTF-8"?><!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>Naval Domination - Multiplayer Naval Strategy Game</title>
<meta name="description" content="Free Online Naval Combat Strategy Game" />
<link rel="stylesheet" type="text/css" href="/public/public.css" />
<script type="text/javascript" src="/nd.js"></script>
<script type="text/javascript">
<!--
image1 = new Image();
image1.src = "head_glow_01.jpg";
image2 = new Image();
image2.src = "head_glow_02.jpg";
image3 = new Image();
image3.src = "head_glow_03.jpg";
image4 = new Image();
image4.src = "head_glow_04.jpg";
image5 = new Image();
image5.src = "head_glow_05.jpg";
image6 = new Image();
image6.src = "head_glow_06.jpg";
image7 = new Image();
image7.src = "head_glow_07.jpg";
image8 = new Image();
image8.src = "head_glow_08.jpg";
// -->
</script>
</head>
<body>
<div id="body">
<div id="header"></div>
<div id="links">

	<a id="home" href="/"></a>
	<a id="chat" href="javascript:void(0)" onclick="OpenChat()"></a>
	<a id="forum" href="/forums/"></a>
	<a id="manual" href="/guide/"></a>
	<a id="about" href="/about.php"></a>
	<a id="rule" href="/rules.php"></a>
	<a id="term" href="/tos.php"></a>
</div>
<div id="login">
<h1>Login</h1>

<form action="/login.php" method="post">
<div>
<label for="try_user">Username:</label>
<input type="text" name="try_user" id="try_user" /><br />
<label for="try_pass">Password:</label>
<input type="password" name="try_pass" id="try_pass" /><br />
<label for="cookie">Stay logged on:</label>
<input type="checkbox" name="cookie" value="1" id="cookie" />
<input type="submit" value="Login" />
</div>
</form><br />
<a href="/lostpass.php">Forgot your Password?</a><br />
New User? <a href="/register.php">Register!</a><br /><br />

<div style="text-align: center;">
<script type="text/javascript">
<!--
google_ad_client = "pub-6101993181692483";
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = "120x600_as";
google_ad_type = "text_image";
google_ad_channel ="0517324140";
google_color_border = "221100";
google_color_bg = "221100";
google_color_link = "9999bb";
google_color_url = "9999bb";
google_color_text = "999999";
//-->
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</div>
</div>
<div style="float:left; width: 610px;">
Body goes here!
</div>


<br style="clear: left;" />
<div style="text-align: center;">
<a href="/">Home</a> ::
<a href="javascript:void(0)" onclick="OpenChat()">Chat</a> ::
<a href="/forums/">Forums</a> ::
<a href="/guide/">Manual</a> ::

<a href="/about.php">About</a> ::
<a href="/rules.php">Rules</a> ::
<a href="/tos.php">Terms</a>
</div>
<p style="text-align: center; font-size:10px;">
Design and Layout Copyright &copy; 2006 by <a href="http://www.appointedfate.com/" style="font-size:10px;">Tributary</a>. All Rights Reserved.<br />
Content and Concept Copyright &copy; 2000-2006 by Naval Domination. All Rights Reserved.<br />

<a href="/tos.php" title="Terms of Service" style="font-size:10px;">Terms of Service</a> -
<a href="/privacy.php" title="Privacy Policy" style="font-size:10px;">Privacy Policy</a> -
<a href="/rules.php" title="Rules" style="font-size:10px;">Rules</a>
</p>
</div>
</body>
</html>
Code: Select all
*
{
	font-family:verdana, arial, helvetica, sans-serif;
  font-size: 9pt;
	margin: 0px;
	padding: 0px;
}
body
{
	background-color: #000;
	background-image: url(cross.gif);
	color: #999;
}
div#body {
	width: 760px;
	margin: 0px auto 4px auto;
	padding: 0px 0px 2px 0px;
	background-color: #210;
	color: #999;
}
div#header {
	background-image: url(head_01.jpg);
	width: 760px;
	height: 227px;
}
div#links a {
	display: block;
	float: left;
}
a {
	color: #99b;
}
a#home {
	background-image: url(head_02.jpg);
	width: 97px;
	height: 33px;
}
a#home:hover {
	background-image: url(head_glow_02.jpg);
}
a#chat {
	background-image: url(head_03.jpg);
	width: 89px;
	height: 33px;
}
a#chat:hover {
	background-image: url(head_glow_03.jpg);
}
a#forum {
	background-image: url(head_04.jpg);
	width: 126px;
	height: 33px;
}
a#forum:hover {
	background-image: url(head_glow_04.jpg);
}
a#manual {
	background-image: url(head_05.jpg);
	width: 139px;
	height: 33px;
}
a#manual:hover {
	background-image: url(head_glow_05.jpg);
}
a#about {
	background-image: url(head_06.jpg);
	width: 109px;
	height: 33px;
}
a#about:hover {
	background-image: url(head_glow_06.jpg);
}
a#rule {
	background-image: url(head_07.jpg);
	width: 99px;
	height: 33px;
}
a#rule:hover {
	background-image: url(head_glow_07.jpg);
}
a#term {
	background-image: url(head_08.jpg);
	width: 101px;
	height: 33px;
}
a#term:hover {
	background-image: url(head_glow_08.jpg);
}
div#login {
	float: left;
	width: 150px;
	position: relative;
}
p
{
	padding: 0px 2px 12px 2px;
}
ol
{
	padding: 0px 0px 12px 20px;
}
ul
{
	padding: 0px 0px 12px 20px;
}
ol > li
{
	padding: 0px 0px 6px 0px;
}
Reply With Quote

  #2 (permalink)  
Old Feb 11th, 2006, 12:00
masonbarge's Avatar
Highly Reputable Member
Join Date: Jan 2006
Location: Atlanta GA
Posts: 631
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS - Margin: Auto; Not working in IE

text-align: center; in the body, and text-align: left; in the container div.
Reply With Quote
  #3 (permalink)  
Old Feb 11th, 2006, 22:34
Reputable Member
Join Date: Sep 2005
Location: Canada, BC
Age: 24
Posts: 239
Thanks: 0
Thanked 0 Times in 0 Posts
Re: CSS - Margin: Auto; Not working in IE

Thanks that fixed it, I hate IE and its non-compliance!
Reply With Quote
Reply

Tags
css, margin, auto, working

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 On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Web page margin dhall Website Planning 1 Sep 2nd, 2007 04:23
overflow:auto not working within float mikep Web Page Design 2 Aug 24th, 2007 12:40
Why am I getting a margin when not specified AdRock Web Page Design 4 Mar 14th, 2007 22:06
margin? nasumaru Web Page Design 14 Jan 30th, 2007 21:52
Margin top IE csa Web Page Design 5 Apr 6th, 2006 03:45


All times are GMT. The time now is 21:50.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43