OOP style messing with CSS design?
Posted: Sat Dec 03, 2005 1:07 pm
Why is my OOP statements making my CSS completely stop?
its weird, but I have two pages, one OOP and one non OOP, and they both use the same stylesheet.
But the one with OOP, when it hits that line with the first OOP statement, the CSS stops styling the page, and any text/graphics after that dont get displayed.
as you can see i use a OO class to deal with my session... is there any way around this or a way to fix this?
heres the code
NON WORKING PHP FILE:
WORKING PHP FILE:
CSS file
its weird, but I have two pages, one OOP and one non OOP, and they both use the same stylesheet.
But the one with OOP, when it hits that line with the first OOP statement, the CSS stops styling the page, and any text/graphics after that dont get displayed.
as you can see i use a OO class to deal with my session... is there any way around this or a way to fix this?
heres the code
NON WORKING PHP FILE:
Code: Select all
<?php
define("x",null);
include_once('session.php');
$ses = new session();
include_once('OOPObjects.php');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>pagenamehere - N00BL33T.COM</title>
<link href="CSS.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="container">
<!-- HEADER - BANNER -->
<div id="header">
<h1>Header - Banner</h1><br />
</div>
<!-- FIRST ROW COLUMN -->
<!-- LOGIN -->
<div id="login">
<p>
Login:<br />
<?php
if($ses->isLogged()==FALSE){
echo "Welcome Guest!<br />";
echo "<a href='login.php'>Login</a>";
}else{
echo "Welcome Member!";
}
?>
</p>
</div>
<!-- NEWS -->
<div id="news">
<p> Testimonies:<br />
Yet to come...
</p>
</div>
<!-- SECOND ROW COLUMN -->
<!-- NAVBAR -->
<div id="navigation">
<p>
Navbar:<br />
<a href="index.php">Home</a>
</p>
</div>
<!-- STATS -->
<div id="stats">
<p>
Stats:<br />
No Site Statisitcs Availiable.
</p>
</div>
<!-- MIDDLE - MAIN CONTENT -->
<div id="content">
<?php
//$content->displayPage("news");
?>
</div>
<!-- FOOTER - Copyrights -->
<div id="footer">
</div>
</div>
</body>
</html>Code: Select all
<?php
session_start();
define("x",null);
include('sources/variables.php');
include('sources/functions.php');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>pagenamehere - N00BL33T.COM</title>
<link href="CSS/000.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="container">
<!-- HEADER - BANNER -->
<div id="header">
<h1>Header - Banner</h1><br />
</div>
<!-- FIRST ROW COLUMN -->
<!-- LOGIN -->
<div id="login">
<p>
Login:<br />
<?php
displayInfo();
?>
</p>
</div>
<!-- NEWS -->
<div id="news">
<p>
News:<br />
No New News.
</p>
</div>
<!-- SECOND ROW COLUMN -->
<!-- NAVBAR -->
<div id="navigation">
<p>
Navbar:<br />
<a href="index.php">Home</a>
</p>
</div>
<!-- STATS -->
<div id="stats">
<p>
Stats:
</p>
</div>
<!-- MIDDLE - MAIN CONTENT -->
<div id="content">
<?php
displayPage();
?>
</div>
<!-- FOOTER - Copyrights -->
<div id="footer">
</div>
</div>
</body>
</html>Code: Select all
a:visited{
color:#FFFFFF;
}
#container{
width:90%;
margin:10px auto;
background-color:#000099;
color:#0066FF;
border:1px solid blue;
line-height:130%;
}
#header{
background-color:#000066;
border-bottom:1px solid black;
padding:.5em;
text-align:center;
}
#header h1{
margin:0;
border:0;
}
#login{
float:left;
width:150px;
padding:.5em;
border:1px solid black;
border-style:outset;
min-height:7.5em;
}
#navigation{
clear:left;
float:left;
width:150px;
padding:.5em;
border:1px solid black;
border-style:outset;
min-height:7.5em;
}
#login p, #navigation p{margin:0 0 .1em 0;}
#news{
float:right;
width:150px;
padding:.5em;
border:1px solid black;
border-style:outset;
min-height:7.5em;
}
#stats{
clear:right;
float:right;
width:150px;
padding:.5em;
border:1px solid black;
border-style:outset;
min-height:7.5em;
}
#news p, #stats p{margin:0 0 .1em 0;}
#content{
margin-left:10em;
margin-right:10em;
padding:1em;
}
#content h2{
margin:0 0 0 0;
text-align:center;
border:1px solid #0066FF;
}
#content h3{
margin-top:1em;
margin-bottom:0;
border:1px solid #0066FF;
}
#footer{
clear:both;
margin:0;
padding:.5em;
border-top:1px solid black;
background-color:#000066;
text-align:center;
}
#footer p{
margin:0;
padding:0;
}
.textbox{
padding:1em;
margin-top:0;
border:1px solid #0066FF;
}