View Single Post
  #2 (permalink)  
Old Dec 30th, 2005, 19:56
herkalees's Avatar
herkalees herkalees is offline
Highly Reputable Member
Join Date: Jul 2005
Location: Massachusetts, USA
Age: 87
Posts: 576
Thanks: 0
Thanked 0 Times in 0 Posts
Re: relative position problem

Try this
Styles:
Code: Select all
body
{margin:0;padding:0;background-color:#EBEBEB;height:99%;}
div#wrap
{width: 750px;position:absolute;left:50%;margin: 0 0 0 -375px;border:1px solid #666666;}
div#top
{width:750px;height:125px;background:#666666;}
div#menu
{width:750px;height:50px;background:#ffffff;}
div#bleft 
{width:375px;height:100px;background:#666666;float:left;}
div#bright 
{width:375px;height:100px;background:#ffffff;float:right;}
div#bot
{width:750px;height:95px;background:#666666;clear:both;}
XHTML:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<title>Test Page</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div id="wrap">
<div id="top"> </div>
<div id="menu"> </div>
<div id="bleft"> </div>
<div id="bright"> </div>
<div id="bot"> </div>
</div>
</body>
</html>
Reply With Quote