PHP interesse |
|
Hey goeiemiddag,
Ik probeer 2 divs onder elkaar te krijgen.
korte uitleg:
ik heb totaal nu 4 divs.
-head
-foot
-menu links (sidebar)
-menu rechts (sidebar2)
aangeroepen door een css.
nu wil ik direct onder menu rechts of links div:sidebar3 hebben (zie hierbeneden)
Nu staat deze onder de main div. Wel onderaan links. maar ik heb liever dat deze netjes onder sidebar komt (menu links)
css
/* Sidebar */
#sidebar {
width: 140px;
padding: 5px;
border: 0px;
border-color: #ffffff;
color: #FFFFFF;
float: left;
height: 300px;
background-image:url(../image/menu.gif);
}
#sidebar3 {
width: 10px;
height: 10px;
border: 1px;
border-color: #000000;
color: #FFFFFF;
float: left;
background-color:black;
}
#sidebar2 {
width: 140px;
padding: 5px;
border: 0px;
border-color: #ffffff;
color: #FFFFFF;
float: right;
height: 300px;
background-image:url(../image/menu.gif);
}
#foot {
width: 900px;
height: 30px;
margin: 0;
padding: 0;
text-align: center;
clear: both;
background-color: red;
background-image: url('../image/footer.gif');
}
/* Sidebar */ #sidebar { width: 140px; padding: 5px; border: 0px; border-color: #ffffff; color: #FFFFFF; float: left; height: 300px; background-image:url(../image/menu.gif); } #sidebar3 { width: 10px; height: 10px; border: 1px; border-color: #000000; color: #FFFFFF; float: left; background-color:black; } #sidebar2 { width: 140px; padding: 5px; border: 0px; border-color: #ffffff; color: #FFFFFF; float: right; height: 300px; background-image:url(../image/menu.gif); } #foot { width: 900px; height: 30px; margin: 0; padding: 0; text-align: center; clear: both; background-color: red; background-image: url('../image/footer.gif'); }
ff snel aangepaste index.php
<?
session_start();
ob_start();
//includen
require_once('Connections/Mysql.php');
//variabelen
$sitename = "blabla.nl";
$path = "pages/";
?>
<html>
<head>
<link href="css/style.css" rel="stylesheet" type="text/css">
</head>
<title><?php echo $sitename; ?></title>
<meta http-equiv="imagetoolbar" content="no">
<body>
<div class="style3" id="head"><h1>HEADER</h1>
</div>
<div class="sidebar" id="sidebar" style="sidebar">
menu
</div>
<div class="sidebar2" id="sidebar2" style="sidebar2">
<? include 'menu/menu2.php'; ?><br>
sidebar 2
<p>
</div>
<div class="style2" id="main">
Main div
</div>
<div id="sidebar3">
blabla</div>
<div class="style3" id="foot">
<div align="center"></div>
</div>
</center>
</body>
</html>
<? //includen require_once('Connections/Mysql.php'); //variabelen $sitename = "blabla.nl"; $path = "pages/"; ?> <html> <head> <link href="css/style.css" rel="stylesheet" type="text/css"> </head> <title> <?php echo $sitename; ?></title> <meta http-equiv="imagetoolbar" content="no"> <body> <div class="style3" id="head"><h1>HEADER</h1> </div> <div class="sidebar" id="sidebar" style="sidebar"> menu </div> <div class="sidebar2" id="sidebar2" style="sidebar2"> <? include 'menu/menu2.php'; ?><br> sidebar 2 <p> </div> <div class="style2" id="main"> Main div </div> <div id="sidebar3"> blabla</div> <div class="style3" id="foot"> <div align="center"></div> </div> </center> </body> </html>
Bedankt,
|