layers centreren

Status
Niet open voor verdere reacties.

Eelcipilpie

Gebruiker
Lid geworden
30 mei 2002
Berichten
73
Hallo, kan iemand kijken of hij het voor elkaar krijgt deze code te centeren, zijn 3 layers , maar krijg ze niet gecenteerd in explorer!!! alvast bedankt!


PHP:
<!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>Untitled Document</title>
<style type="text/css">
<!--
body {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	background-color: #999999;
	margin: 0px;
	padding: 0px;
}
#Site {
	position:absolute;
	width:625px;
	height:675px;
	z-index:1;
	left: 100px;
	top: 2px;
}
#inhoud {
	position:absolute;
	width:479px;
	height:554px;
	z-index:1;
	left: 125px;
	top: 100px;
	background-color: #FFFFFF;
	padding: 10px;
	border-top-width: 1px;
	border-left-width: 1px;
	border-top-style: solid;
	border-left-style: solid;
	border-top-color: #333333;
	border-left-color: #333333;
}
#banner {
	position:absolute;
	width:625px;
	height:115px;
	z-index:2;
	left: 0px;
	top: -16px;
	background-color: #FFFFFF;
}
#menu {
	position:absolute;
	width:104px;
	height:554px;
	z-index:3;
	left: 0px;
	top: 100px;
	background-color: #FFFFFF;
	padding: 10px;
	border-top-width: 1px;
	border-top-style: solid;
	border-top-color: #333333;
	border-left-color: #FFFFFF;
}
-->
</style>
</head>
<body>
<div id="Site">
  <div id="inhoud"> </div>
  <div id="banner"></div>
  <div id="menu"></div>
</div>
</body>
</html>



[Moderator-Edit] Php-tag geplaatst. [/Edit]
 
Laatst bewerkt door een moderator:
Even wat gewijzigd:
PHP:
<!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>Untitled Document</title>
<style type="text/css">
<!--
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
background-color: #999999;
margin: 0px;
padding: 0px;
}
#Site {
text-align:center;
width:625px;
height:675px;
z-index:1;
margin-left: auto;
margin-right: auto;

}

#banner {
width:625px;
height:115px;
background-color: #FFFFFF;
}
#menu {
width:105px;
height:554px;
float:left;
text-align:left;
background-color: #808040;
padding: 10px;
border-top-width: 1px;
border-top-style: solid;
border-top-color: #333333;
border-left-color: #FFFFFF;
}
#inhoud {

width:477px;
height:554px;
text-align:left;
background-color: #FFFFFF;
padding: 10px;
border-top-width: 1px;
border-left-width: 0px;
border-top-style: solid;
border-left-style: solid;
border-top-color: #333333;
border-left-color: #333333;
}

-->
</style>
</head>
<body>
<div id="Site">site
<div id="banner">banner</div><div style="clear:both;"></div>
<div id="menu">menu<br/>
hier komt het menu te staan</div>
<div id="inhoud">inhoud <br/>
<br/>
Hier zetten we weg wat we wensen te vertellen, of gewoon een potje liegen, 
dat mag ook wel eens op zijn tijd.<br/>
Toch?</div>
</div>
</body>
</html>

Gecentreerd,
tekst voor inhoud en menu left
absolute positie eruit gehaald.
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan