...

View Full Version : [FIXED]Getting a CSS "frame" to his correct pos.



Diod
12-17-2005, 01:05 PM
I'm having trouble getting the "body" "frame" (how do u call this when using css?) in the following code to go up(see the pics):

This is how it looks now:
http://users.skynet.be/fa321669/site-pre.JPG

This is how it should look: (the red is where the "body" should be placed)
http://users.skynet.be/fa321669/site-post.JPG

index.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" />
<link href="includes/site.css" rel="stylesheet" type="text/css">
</head>
<body>

<?
// MySQL init and functions
include_once("config.inc");
@ mysql_connect($host, $username,$password) or die("Kan niet verbinden met de database");
mysql_select_db($database);

function print_body($page) {
if ($page <> NULL){
echo "<title>Schuivende Pol :: " . $page ."</title>";
echo "<center><h3>" . $page . "</h3></center>";
@ include("includes/" . $page . ".php");
}
else {
print_body(Nieuws);
}
}
?>

<div id="logo">
<img class="logo" src="images/logo.gif"/>
<img class="header" src="images/header.gif"/>
</div>

<div id="menu">
<?
$result = mysql_query("SELECT * FROM sp_pages ORDER BY ID ASC");
while ($menu = mysql_fetch_array($result)) {
echo '<a href="index.php?page=' . $menu[Name] . '">' . $menu[Name] . '</a><br>';
}
?>

</div>

<div id="body">
<?
$page = $_GET['page'];

print_body($page);
?>
</div>

<div id="footer">
<?
$result = mysql_query("SELECT Text FROM sp_site WHERE Name='Footer'");
while ($footer = mysql_fetch_array($result)) {
echo $footer[0];
}
?>
</div>

</body>
</html>


site.css

body {
background:#607673;
}

#menu {
float:left;
width:156px;
background:#FFF;
border:2px solid #7c8c8e;
margin-right:15px;
padding-top:20px;
padding-bottom:200px;
height:50%;
background:#607673;
}

#body {
font-size:13px;
background:#FFF;
border:2px solid #7c8c8e;
text-align:center;
height:10%;
width:623px;
padding-top:20px;
padding-bottom:20px;
background:#607673;
}

#logo {
float:inherit;
margin-right:inherit;
background-repeat:no-repeat;
background:#607673;
}

img.logo {
height:116px;
width:156px;
border:2px solid #7c8c8e;
background-repeat:no-repeat;
margin-right:15px;
}

img.header {
border:2px solid #7c8c8e;
height:116px;
width:623px;
background-repeat:no-repeat;
}

a {
color:#FF0000;
}

#footer {
background:#607673;
text-align:center;
border:2px solid #7c8c8e;
width:623px;
padding-top:10px;
padding-bottom:10px;
margin-top:3px;
}

Diod
12-17-2005, 02:08 PM
Fixed



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum