2 replies [Last post]
Majd-GFX
Offline
newbie
USA
Last seen: 17 years 12 weeks ago
USA
Joined: 2004-09-06
Posts: 4
Points: 0

hi im making a site in css...i have 2 problems

1) everything is positioned about 10px down even though i specified it not to be...

2) in firefox, nothing is centered yet in IE6.0 it's centered (i want it to be centered) why is that?

EDIT: also, i want the text in the content div to be word-wraped i heard it was by defining a width...however, it's not working...

here's my code...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">

<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<link rel="stylesheet" type="text/css" href="centering.css" />
</head>
<body bgcolor="#808080" >
<div id="center_div">
  <div id="headerid" class="header"></div>
  <div id="body" class="content">
    &nbsp;</div>
</div>
</body>
</html>

body {
	text-align: center;
	}
#center_div {
	margin: auto; 
	height: auto; 
	}
.enclosing {
	width: 557px;
	height: auto;
	position: relative;
	background-color: #DAD7C4;
	}
.header {
	background-image: url('heavymetalheader.jpg');
	position: relative;
	width: 628px;
	height: 300px
	}
.content {
	position: relative;
	background-color: #DAD7C4;
	width: 557px;
	max-width: 557px;
	height: auto;
	
	}

TimeBandit
Offline
Enthusiast
Maryland, USA
Last seen: 17 years 13 weeks ago
Maryland, USA
Joined: 2004-09-02
Posts: 112
Points: 0

Re: 2 problems...centering...and position

Majd-GFX wrote:
1) everything is positioned about 10px down even though i specified it not to be...

2) in firefox, nothing is centered yet in IE6.0 it's centered (i want it to be centered) why is that?

EDIT: also, i want the text in the content div to be word-wraped i heard it was by defining a width...however, it's not working...
[/code]

max-width is not cross-browser supported
BODY needs margin: 0px; padding: 0px

NeoNizer
Offline
newbie
Leiden,The Netherlands
Last seen: 17 years 12 weeks ago
Leiden,The Netherlands
Joined: 2004-09-07
Posts: 9
Points: 0

2 problems...centering...and position

i happen to have the same kind of problem, but with firefox at pernixtest.tk
as u can see, in the menu firefox doesn't make the submenu's as long as they are in ie.. they need be just as long as their header...

hit start to open the menu and play around with it...

any feedback appreciated