Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Dec 2005
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    [FIXED]Getting a CSS "frame" to his correct pos.

    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:
    PHP Code:
    <!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
    Code:
    	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;
    		}
    Last edited by Diod; 12-17-2005 at 02:08 PM.

  • #2
    New Coder
    Join Date
    Dec 2005
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Fixed


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •